commit 371929c8f0b5eb9aae1a23cc273413b9f4c0165e Author: Scott Mayhew Date: Sun Dec 8 06:08:53 2024 -0500 exports: Fix referrals when --enable-junction=no Commit 15dc0bea ("exportd: Moved cache upcalls routines into libexport.a") caused write_fsloc() to be elided when junction support is disabled. Remove the not needed #ifdef HAVE_JUNCTION_SUPPORT which blocks the referrals from working when --enable-junction=no is set. (only the #ifdef HAVE_JUNCTION_SUPPORT should be around actual junction code). Fixes: 15dc0bea ("exportd: Moved cache upcalls routines into libexport.a") Link: https://bugs.debian.org/1035908 Link: https://bugs.debian.org/1083098 Reviewed-by: Roland Mainz Reviewed-by: Chuck Lever Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit d2a9e76b4205107e9fc1ac2e10984b2dbad8d8f6 Author: Bogdan-Cristian Tătăroiu Date: Sun Dec 8 05:56:18 2024 -0500 nfsidmap(v2): Add guards around [nfsidmap] usages of [sysconf]. sysconf(_SC_GETPW_R_SIZE_MAX) and sysconf(_SC_GETGR_R_SIZE_MAX) return -1 on musl, which causes either segmentation faults or ENOMEM errors. Replace all usages of sysconf with dedicated methods that guard against a result of -1. Signed-off-by: Steve Dickson commit ce17ca7f4093d1c760651a7fed92e3e741cb11aa Author: Benjamin Coddington Date: Wed Nov 27 07:01:06 2024 -0500 libnsm(v2): fix the safer atomic filenames fix Commit 9f7a91b51ffc ("libnsm: safer atomic filenames") messed up the length arguement to snprintf() in nsm_make_temp_pathname such that the length is longer than the computed string. When compiled with "-O -D_FORTIFY_SOURCE=3", __snprintf_chk will fail and abort statd. The fix is to correct the original size calculation, then pull one from the snprintf length for the final "/". Fixes: 9f7a91b51ffc ("libnsm: safer atomic filenames") Signed-off-by: Benjamin Coddington Signed-off-by: Steve Dickson commit ae9a24fee3ffcfd27ae2c87fdde3ed1d77b7ec5b Author: Steve Dickson Date: Wed Nov 27 06:56:45 2024 -0500 Revert "libnsm: fix the safer atomic filenames fix" This reverts commit 8fcddae4437510137baf108f477d116ce345ce80. commit 8fcddae4437510137baf108f477d116ce345ce80 Author: Benjamin Coddington Date: Wed Nov 27 06:32:46 2024 -0500 libnsm: fix the safer atomic filenames fix Commit 9f7a91b51ffc ("libnsm: safer atomic filenames") messed up the length arguement to snprintf() in nsm_make_temp_pathname such that the length is longer than the computed string. When compiled with "-O -D_FORTIFY_SOURCE=3", __snprintf_chk will fail and abort statd. The fix is to correct the original size calculation, then pull one from the snprintf length for the final "/". Fixes: 9f7a91b51ffc ("libnsm: safer atomic filenames") Signed-off-by: Benjamin Coddington Signed-off-by: Steve Dickson commit eb5abb5c60ab60f3c2f22518d513ed187f39bd9b Author: Scott Mayhew Date: Fri Nov 22 10:51:20 2024 -0500 nfsd: dump default number of threads to 16 nfsdctl defaults to 16 threads. Since the nfs-server.service file first tries nfsdctl and then falls back to rpc.nfsd, it would probably be wise to make the default in rpc.nfsd and nfs.conf 16, for the sake of consistency and to avoid surprises. Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 36f6d4b4f0ae7b0f117177008b7e19e1e40d9118 Author: Jeff Layton Date: Fri Nov 22 10:46:01 2024 -0500 autoconf: don't build nfsdcltrack by default Now that we've started the process to remove legacy v4 client tracking methods, let's stop building nfsdcltrack by default. Signed-off-by: Jeff Layton Signed-off-by: Steve Dickson commit 2c17683140b4488215cd96e49ebd842a4f2cf5e8 Author: Seiichi Ikarashi Date: Wed Nov 20 15:47:09 2024 -0500 nfs(5): Update rsize/wsize options The rsize/wsize values are not multiples of 1024 but multiples of the system's page size or powers of 2 if < system's page size as defined in fs/nfs/internal.h:nfs_io_size(). Signed-off-by: Steve Dickson commit 42e9fc2a78ce824406a34d86e4253722ba551201 Author: Scott Mayhew Date: Wed Nov 20 14:54:47 2024 -0500 nfsdctl: clarify when versions can be set on the man page Attempting to make version changes while there are nfsd threads running fails with -EBUSY, so make note of it on the man page. Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit bd7f3539d1e7ed7bf2bf53bd47a7a3ff2b208306 Author: Scott Mayhew Date: Wed Nov 20 14:46:56 2024 -0500 nfsdctl: fix up the help text in version_usage() The help text in version_usage() has examples with a 'v' character in the version string, but the format string in the sscanf() call in version_func() doesn't contain a 'v' character. Reviewed-by: Jeff Layton Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 9f7a91b51ffcd8c1c3eec2909648e53c68c15e0d Author: Benjamin Coddington Date: Wed Nov 20 14:42:04 2024 -0500 libnsm: safer atomic filenames We've gotten a report of reboot notifications being sent to domains that end in '.new', which can happen if the NSM temporary pathname code leaves a file behind. Let's fix this up by prepending a single '.' to the temp path which will never be resolvable as a DNS record. https://lore.kernel.org/linux-nfs/04D30B5A-C53E-4920-ADCB-C77F5577669E@oracle.com/T/#t Reported-by: Philip Rowlands Reviewed-by: Chuck Lever Signed-off-by: Benjamin Coddington Signed-off-by: Steve Dickson commit d66f18ce53b486f202f649092376f70ea87e73d8 Author: Benjamin Coddington Date: Wed Nov 20 14:36:21 2024 -0500 nfs-utils: fixup statd testing simulator host arg The getopt setup for the host arg was not expecing a value, update it as expected Signed-off-by: Benjamin Coddington Signed-off-by: Steve Dickson commit 38b46cb1f28737069d7887b5ccf7001ba4a4ff59 Author: Robert Yang Date: Sat Nov 9 13:37:17 2024 -0500 reexport.h: Include unistd.h to compile with musl Signed-off-by: Robert Yang Signed-off-by: Steve Dickson commit 385c89c64274c75e65f7ce09f7cec4896b981292 Author: Scott Mayhew Date: Sat Nov 9 13:16:41 2024 -0500 Makefile.am: allow mount.nfs to be writeable by owner On Red Hat-based systems, the debug symbol files are built with a .gdb_index section to speed up gdb initialization. The gdb-add-index program calls objcopy to merge the index file into the object file. That fails if the object file isn't writeable by the owner. Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 6bfb5f050a6dc9da9a62c6c0049acc4153a645f5 Author: Seiichi Ikarashi Date: Sat Nov 9 13:13:34 2024 -0500 mount.nfs: retry NFSv3 mount after NFSv4 failure in auto negotiation The problem happens when a v3 mount fails with ETIMEDOUT after the v4 mount failed with EPROTONOSUPPORT, in mount auto negotiation. It immediately breaks from the "for" loop in nfsmount_fg() or nfsmount_child() due to EPROTONOSUPPORT, never doing the expected retries until timeout. Reviewed-by: Scott Mayhew Signed-off-by: Seiichi Ikarashi Signed-off-by: Steve Dickson