- From 28e6de1c2feef0abd4a7ee768695509e10e1f5c4 Mon Sep 17 00:00:00 2001
- From: Cedric Blancher <cedric.blancher@gmail.com>
- Date: Sat, 15 Mar 2025 16:36:22 +0100
- Subject: [PATCH 1/3] daemon: NFSv4.x minor version autonegotiation should stop
- at minor version 1
- NFSv4.x minor version autonegotiation should stop at minor version 1
- (i.e. try NFSv4.2, NFSv4.1, but NOT NFSv4.0).
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/namespace.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- diff --git a/daemon/namespace.c b/daemon/namespace.c
- index 25cb94f..b5363eb 100644
- --- a/daemon/namespace.c
- +++ b/daemon/namespace.c
- @@ -423,7 +423,7 @@ retry_nfs41_exchange_id:
- if (status) {
- if (status == NFS4ERR_MINOR_VERS_MISMATCH) {
- if (nfsminorvers_autonegotiate &&
- - (root->nfsminorvers >= 1)) {
- + (root->nfsminorvers > 1)) {
- root->nfsminorvers--;
- goto retry_nfs41_exchange_id;
- }
- --
- 2.45.1
- From 13a0d2d865f3d32ec1d8f0d7ba2fc325f8597625 Mon Sep 17 00:00:00 2001
- From: Cedric Blancher <cedric.blancher@gmail.com>
- Date: Sat, 15 Mar 2025 16:48:14 +0100
- Subject: [PATCH 2/3] tests: Add Illumos NFSv4.1 server setup
- Add Illumos NFSv4.1 server setup.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- tests/nfs_server_setup.txt | 37 +++++++++++++++++++++++++++++++++++++
- 1 file changed, 37 insertions(+)
- diff --git a/tests/nfs_server_setup.txt b/tests/nfs_server_setup.txt
- index 4d81277..a4ff027 100644
- --- a/tests/nfs_server_setup.txt
- +++ b/tests/nfs_server_setup.txt
- @@ -75,4 +75,41 @@ chmod A... # to edit ACLs
- See https://docs.oracle.com/en/operating-systems/solaris/oracle-solaris/11.4/manage-nfs/troubleshooting-network-file-systems1.html
- +#
- +# Illumos NFSv4.1 server setup
- +# (similar to Solaris 11)
- +#
- +
- +##### 1. Server setup
- +# enable ntp server "10.49.0.5"
- +printf "server 10.49.0.5\n" >/etc/inet/ntp.conf
- +svcadm enable ntp
- +svcadm restart ntp
- +
- +# configure&start NFS server
- +svcadm enable network/nfs/server
- +sharectl set -p nfsmapid_domain=global.loc nfs
- +sharectl set -p server_delegation=on nfs
- +sharectl set -p server_versmax=4.1 nfs
- +mkdir /nfsdata
- +chmod a+rwx /nfsdata
- +share -F nfs -o rw /nfsdata/
- +svcs svc:/network/nfs/server:default
- +
- +# 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:
- +ls -v filename # list ACLs
- +chmod A... # to edit ACLs
- +
- +##### 4. Troubleshooting:
- +See https://docs.oracle.com/en/operating-systems/solaris/oracle-solaris/11.4/manage-nfs/troubleshooting-network-file-systems1.html
- +
- +
- # EOF.
- --
- 2.45.1
- From 88cf98351018b3d95870f877c55c8666390247e4 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Sat, 15 Mar 2025 17:32:17 +0100
- Subject: [PATCH 3/3] nfs41_build_features.h: Change default creation mode for
- non-Cygwin/SFU files to 0755
- Change default creation mode (NFS41_DRIVER_DEFAULT_FILE_CREATE_MODE) for
- non-Cygwin/SFU files to 0755.
- NFS41_DRIVER_DEFAULT_FILE_CREATE_MODE should really be
- mode=0644, but in real life Windows installer software
- creates *.(exe|dll|com|sys) files without "GENERIC_EXECUTE" ACL
- entries, and without any |FILE_EXECUTE| set no binary (*.exe,
- and *.ddl dependicies) will start.
- Installers make it even worse by creating unpacked files with
- temporary names like "XXfoo.tmp", and then rename it "foo.exe",
- so there is no way to fix this at file creation time.
- Fix is to set NFS41_DRIVER_DEFAULT_FILE_CREATE_MODE=0755, but
- the side-effect is that all new files created by cmd.exe or powershell
- will have the +x mode bit set, too.
- Reported-by: Lionel Cons <lionelcons1972@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- nfs41_build_features.h | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
- diff --git a/nfs41_build_features.h b/nfs41_build_features.h
- index d2fd138..0024d58 100644
- --- a/nfs41_build_features.h
- +++ b/nfs41_build_features.h
- @@ -127,10 +127,20 @@
- /*
- * Default POSIX permission mode bits for new files
- * and directories.
- - * Can be ovrriden with a "NfsV3Attributes" EA
- + * Notes:
- + * - Can be overridden with a "NfsV3Attributes" EA, which Cygwin,
- + * ServicesForUNIX, etc. do by default for all "NFS" filesystems.
- + * - NFS41_DRIVER_DEFAULT_FILE_CREATE_MODE should really be
- + * mode=0644, but in real life Windows installer software
- + * creates *.(exe|dll|com|sys) files without "GENERIC_EXECUTE" ACL
- + * entries, and without any |FILE_EXECUTE| set no binary (*.exe,
- + * and *.ddl dependicies) will start.
- + * Installers make it even worse by creating unpacked files with
- + * temporary names like "XXfoo.tmp", and then rename it "foo.exe",
- + * so there is no way to fix this at file creation time.
- */
- #define NFS41_DRIVER_DEFAULT_DIR_CREATE_MODE (0755)
- -#define NFS41_DRIVER_DEFAULT_FILE_CREATE_MODE (0644)
- +#define NFS41_DRIVER_DEFAULT_FILE_CREATE_MODE (0755)
- /*
- * NFS41_DRIVER_DEBUG_FS_NAME - define which filesystem name should
- --
- 2.45.1
msnfs41client: Patches for Illumos NFSv4.1 server testing, FileCreationMode=0755+misc, 2025-03-15
Posted by Anonymous on Sat 15th Mar 2025 16:50
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.