pastebin - collaborative debugging tool
rovema.kpaste.net RSS


msnfs41client: Patches for Solaris/Illumos to put sys/nobody groups in the idmapper+increase symlink depth to 63, 2025-04-10
Posted by Anonymous on Thu 10th Apr 2025 19:58
raw | new post

  1. From 5cc0fe786c4b7d6eb881ded73d24e4a59d9049b4 Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Thu, 10 Apr 2025 18:15:33 +0200
  4. Subject: [PATCH 1/2] cygwin,tests: Move mapping for Solaris/Illumos
  5.  "sys"+"nobody" group accounts into idmapper
  6.  
  7. Move mapping for Solaris/Illumos "sys"+"nobody" group accounts into
  8. the idmapper.
  9.  
  10. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  11. ---
  12. cygwin/devel/msnfs41client.bash | 17 -----------------
  13.  cygwin_idmapper.ksh             | 15 +++++++++++++++
  14.  tests/nfs_server_setup.txt      | 14 ++------------
  15.  3 files changed, 17 insertions(+), 29 deletions(-)
  16.  
  17. diff --git a/cygwin/devel/msnfs41client.bash b/cygwin/devel/msnfs41client.bash
  18. index 004a11e..4a391dd 100755
  19. --- a/cygwin/devel/msnfs41client.bash
  20. +++ b/cygwin/devel/msnfs41client.bash
  21. @@ -281,23 +281,6 @@ function nfsclient_install
  22.         # query new 'ms-nfs41-client-globalmountall-service'
  23.         sc query 'ms-nfs41-client-globalmountall-service'
  24.  
  25. -       #
  26. -       # Add entries for groups "sys" and "nobody" used by
  27. -       # Solaris/Illumos nfsd
  28. -       #
  29. -       if { getent group 'sys' >'/dev/null' 2>&1 ; (( $? == 2 )) ; } ; then
  30. -               {
  31. -                       printf '# "sys" entry added by ms-nfs41-client for Solaris/Illumos nfsd\n'
  32. -                       printf "sys:S-1-0-3:3:\n"
  33. -               } >>'/etc/group'
  34. -       fi
  35. -       if { getent group 'nobody' >'/dev/null' 2>&1 ; (( $? == 2 )) ; } ; then
  36. -               {
  37. -                       printf '# "nobody" entry added by ms-nfs41-client for Solaris/Illumos nfsd\n'
  38. -                       printf "nobody:S-1-0-65534:65534:\n"
  39. -               } >>'/etc/group'
  40. -       fi
  41. -
  42.         #
  43.         # check whether ksh93 works
  44.         # (The ms-nfs41-client cygwin idmapper uses ksh93 scripts for
  45. diff --git a/cygwin_idmapper.ksh b/cygwin_idmapper.ksh
  46. index be166f8..84686c2 100644
  47. --- a/cygwin_idmapper.ksh
  48. +++ b/cygwin_idmapper.ksh
  49. @@ -178,6 +178,21 @@ compound -A localgroups=(
  50.                 localgroupname='nogroup'
  51.                 localgid=65534
  52.         )
  53. +       #
  54. +       # Group "sys" required for Solaris/Illumos nfsd
  55. +       #
  56. +       ["sys"]=(
  57. +               localgroupname='sys'
  58. +               localgid=3
  59. +       )
  60. +       #
  61. +       # Group "nobody" required for Solaris/Illumos nfsd
  62. +       # Question is why "nobody" shows up in a "group" idmapperr lookup
  63. +       #
  64. +       ["nobody"]=(
  65. +               localgroupname='nobody'
  66. +               localgid=65534
  67. +       )
  68.  )
  69.  
  70.  function getent_local_domain_passwd
  71. diff --git a/tests/nfs_server_setup.txt b/tests/nfs_server_setup.txt
  72. index 83c2ff6..b9e2267 100644
  73. --- a/tests/nfs_server_setup.txt
  74. +++ b/tests/nfs_server_setup.txt
  75. @@ -74,12 +74,7 @@ svcs network/nfs/server
  76.  # performance: disable sync/ZIL on ZFS pool which exports NFS files
  77.  zfs set sync=disabled rpool
  78.  
  79. -##### 2. Windows ms-nfs41-client setup:
  80. -# Add entries for groups "sys" and "nobody" used by Solaris nfsd
  81. -printf "sys:S-1-0-3:3:\n" >>'/etc/group'
  82. -printf "nobody:S-1-0-65534:65534:\n" >>'/etc/group'
  83. -
  84. -##### 3. Misc commands:
  85. +##### 2. Misc commands:
  86.  ls -v filename # list ACLs
  87.  chmod A... # to edit ACLs
  88.  
  89. @@ -125,12 +120,7 @@ svcs network/nfs/server
  90.  # performance: disable sync/ZIL on ZFS pool which exports NFS files
  91.  zfs set sync=disabled rpool
  92.  
  93. -##### 2. Windows ms-nfs41-client setup:
  94. -# Add entries for groups "sys" and "nobody" used by Solaris nfsd
  95. -printf "sys:S-1-0-3:3:\n" >>/etc/groups
  96. -printf "nobody:S-1-0-65534:65534:\n" >>/etc/group
  97. -
  98. -##### 3. Misc commands:
  99. +##### 2. Misc commands:
  100.  ls -v filename # list ACLs
  101.  chmod A... # to edit ACLs
  102.  
  103. --
  104. 2.45.1
  105.  
  106. From bf9f0b5baef92118d86cde24e6015ac4197ddf93 Mon Sep 17 00:00:00 2001
  107. From: Roland Mainz <roland.mainz@nrubsig.org>
  108. Date: Thu, 10 Apr 2025 20:49:20 +0200
  109. Subject: [PATCH 2/2] daemon: Increase maximum symlink depth to 63
  110.  
  111. Increase maximum symlink depth from 31 to 63, per
  112. https://learn.microsoft.com/en-us/windows/win32/fileio/reparse-points
  113. ---- snip ----
  114. ... There is a limit of 63 reparse points on any given path.
  115. NOTE: The limit can be reduced depending on the length of the
  116. reparse point. For example, if your reparse point targets a fully
  117. qualified path, the limit becomes 31.
  118. Windows Server 2003 and Windows XP: There is a limit of 31 reparse
  119. points on any given path.
  120. ---- snip ----
  121.  
  122. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  123. ---
  124. daemon/nfs41_const.h | 21 +++++++++++++++++----
  125.  1 file changed, 17 insertions(+), 4 deletions(-)
  126.  
  127. diff --git a/daemon/nfs41_const.h b/daemon/nfs41_const.h
  128. index e922718..97e5c8a 100644
  129. --- a/daemon/nfs41_const.h
  130. +++ b/daemon/nfs41_const.h
  131. @@ -1,5 +1,6 @@
  132.  /* NFSv4.1 client for Windows
  133. - * Copyright (C) 2012 The Regents of the University of Michigan
  134. + * Copyright (C) 2012 The Regents of the University of Michigan
  135. + * Copyright (C) 2022-2025 Roland Mainz <roland.mainz@nrubsig.org>
  136.   *
  137.   * Olga Kornievskaia <aglo@umich.edu>
  138.   * Casey Bodley <cbodley@umich.edu>
  139. @@ -83,9 +84,21 @@
  140.  /* "udp" "tcp" "udp6" "tcp6" */
  141.  #define NFS41_NETWORK_ID_LEN        4
  142.  
  143. -/* msdn: There is a maximum of 31 reparse points (and
  144. - * therefore symbolic links) allowed in a particular path. */
  145. -#define NFS41_MAX_SYMLINK_DEPTH     31
  146. +/*
  147. + * Symlink depth limit
  148. + *
  149. + * From
  150. + * https://learn.microsoft.com/en-us/windows/win32/fileio/reparse-points
  151. + * ---- snip ----
  152. + * ... There is a limit of 63 reparse points on any given path.
  153. + * NOTE: The limit can be reduced depending on the length of the
  154. + * reparse point. For example, if your reparse point targets a fully
  155. + * qualified path, the limit becomes 31.
  156. + * Windows Server 2003 and Windows XP: There is a limit of 31 reparse
  157. + * points on any given path.
  158. + * ---- snip ----
  159. + */
  160. +#define NFS41_MAX_SYMLINK_DEPTH     63
  161.  
  162.  
  163.  /* 424 bytes: max rpc header for reply with data */
  164. --
  165. 2.45.1

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at