- From 5cc0fe786c4b7d6eb881ded73d24e4a59d9049b4 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 10 Apr 2025 18:15:33 +0200
- Subject: [PATCH 1/2] cygwin,tests: Move mapping for Solaris/Illumos
- "sys"+"nobody" group accounts into idmapper
- Move mapping for Solaris/Illumos "sys"+"nobody" group accounts into
- the idmapper.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/devel/msnfs41client.bash | 17 -----------------
- cygwin_idmapper.ksh | 15 +++++++++++++++
- tests/nfs_server_setup.txt | 14 ++------------
- 3 files changed, 17 insertions(+), 29 deletions(-)
- diff --git a/cygwin/devel/msnfs41client.bash b/cygwin/devel/msnfs41client.bash
- index 004a11e..4a391dd 100755
- --- a/cygwin/devel/msnfs41client.bash
- +++ b/cygwin/devel/msnfs41client.bash
- @@ -281,23 +281,6 @@ function nfsclient_install
- # query new 'ms-nfs41-client-globalmountall-service'
- sc query 'ms-nfs41-client-globalmountall-service'
- - #
- - # Add entries for groups "sys" and "nobody" used by
- - # Solaris/Illumos nfsd
- - #
- - if { getent group 'sys' >'/dev/null' 2>&1 ; (( $? == 2 )) ; } ; then
- - {
- - printf '# "sys" entry added by ms-nfs41-client for Solaris/Illumos nfsd\n'
- - printf "sys:S-1-0-3:3:\n"
- - } >>'/etc/group'
- - fi
- - if { getent group 'nobody' >'/dev/null' 2>&1 ; (( $? == 2 )) ; } ; then
- - {
- - printf '# "nobody" entry added by ms-nfs41-client for Solaris/Illumos nfsd\n'
- - printf "nobody:S-1-0-65534:65534:\n"
- - } >>'/etc/group'
- - fi
- -
- #
- # check whether ksh93 works
- # (The ms-nfs41-client cygwin idmapper uses ksh93 scripts for
- diff --git a/cygwin_idmapper.ksh b/cygwin_idmapper.ksh
- index be166f8..84686c2 100644
- --- a/cygwin_idmapper.ksh
- +++ b/cygwin_idmapper.ksh
- @@ -178,6 +178,21 @@ compound -A localgroups=(
- localgroupname='nogroup'
- localgid=65534
- )
- + #
- + # Group "sys" required for Solaris/Illumos nfsd
- + #
- + ["sys"]=(
- + localgroupname='sys'
- + localgid=3
- + )
- + #
- + # Group "nobody" required for Solaris/Illumos nfsd
- + # Question is why "nobody" shows up in a "group" idmapperr lookup
- + #
- + ["nobody"]=(
- + localgroupname='nobody'
- + localgid=65534
- + )
- )
- function getent_local_domain_passwd
- diff --git a/tests/nfs_server_setup.txt b/tests/nfs_server_setup.txt
- index 83c2ff6..b9e2267 100644
- --- a/tests/nfs_server_setup.txt
- +++ b/tests/nfs_server_setup.txt
- @@ -74,12 +74,7 @@ svcs network/nfs/server
- # performance: disable sync/ZIL on ZFS pool which exports NFS files
- zfs set sync=disabled rpool
- -##### 2. Windows ms-nfs41-client setup:
- -# Add entries for groups "sys" and "nobody" used by Solaris nfsd
- -printf "sys:S-1-0-3:3:\n" >>'/etc/group'
- -printf "nobody:S-1-0-65534:65534:\n" >>'/etc/group'
- -
- -##### 3. Misc commands:
- +##### 2. Misc commands:
- ls -v filename # list ACLs
- chmod A... # to edit ACLs
- @@ -125,12 +120,7 @@ svcs network/nfs/server
- # performance: disable sync/ZIL on ZFS pool which exports NFS files
- zfs set sync=disabled rpool
- -##### 2. Windows ms-nfs41-client setup:
- -# Add entries for groups "sys" and "nobody" used by Solaris nfsd
- -printf "sys:S-1-0-3:3:\n" >>/etc/groups
- -printf "nobody:S-1-0-65534:65534:\n" >>/etc/group
- -
- -##### 3. Misc commands:
- +##### 2. Misc commands:
- ls -v filename # list ACLs
- chmod A... # to edit ACLs
- --
- 2.45.1
- From bf9f0b5baef92118d86cde24e6015ac4197ddf93 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 10 Apr 2025 20:49:20 +0200
- Subject: [PATCH 2/2] daemon: Increase maximum symlink depth to 63
- Increase maximum symlink depth from 31 to 63, per
- https://learn.microsoft.com/en-us/windows/win32/fileio/reparse-points
- ---- snip ----
- ... There is a limit of 63 reparse points on any given path.
- NOTE: The limit can be reduced depending on the length of the
- reparse point. For example, if your reparse point targets a fully
- qualified path, the limit becomes 31.
- Windows Server 2003 and Windows XP: There is a limit of 31 reparse
- points on any given path.
- ---- snip ----
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/nfs41_const.h | 21 +++++++++++++++++----
- 1 file changed, 17 insertions(+), 4 deletions(-)
- diff --git a/daemon/nfs41_const.h b/daemon/nfs41_const.h
- index e922718..97e5c8a 100644
- --- a/daemon/nfs41_const.h
- +++ b/daemon/nfs41_const.h
- @@ -1,5 +1,6 @@
- /* NFSv4.1 client for Windows
- - * Copyright (C) 2012 The Regents of the University of Michigan
- + * Copyright (C) 2012 The Regents of the University of Michigan
- + * Copyright (C) 2022-2025 Roland Mainz <roland.mainz@nrubsig.org>
- *
- * Olga Kornievskaia <aglo@umich.edu>
- * Casey Bodley <cbodley@umich.edu>
- @@ -83,9 +84,21 @@
- /* "udp" "tcp" "udp6" "tcp6" */
- #define NFS41_NETWORK_ID_LEN 4
- -/* msdn: There is a maximum of 31 reparse points (and
- - * therefore symbolic links) allowed in a particular path. */
- -#define NFS41_MAX_SYMLINK_DEPTH 31
- +/*
- + * Symlink depth limit
- + *
- + * From
- + * https://learn.microsoft.com/en-us/windows/win32/fileio/reparse-points
- + * ---- snip ----
- + * ... There is a limit of 63 reparse points on any given path.
- + * NOTE: The limit can be reduced depending on the length of the
- + * reparse point. For example, if your reparse point targets a fully
- + * qualified path, the limit becomes 31.
- + * Windows Server 2003 and Windows XP: There is a limit of 31 reparse
- + * points on any given path.
- + * ---- snip ----
- + */
- +#define NFS41_MAX_SYMLINK_DEPTH 63
- /* 424 bytes: max rpc header for reply with data */
- --
- 2.45.1
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
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.