commit 4c2da1619815faad761df98c001feabda33085d6 Author: Steve Dickson Date: Tue Oct 20 13:13:59 2020 -0400 Release: 2.5.2 Signed-off-by: Steve Dickson commit 7a6b14b13ed333330142460db366c73a86dee688 Author: Steve Dickson Date: Wed Oct 21 09:10:58 2020 -0400 mount.nfs: Fail when v3 related options are passed for v4 mounts Added the missing v3-only mount option to list that should cause v4 mount to fail. Found-by: Kenneth D'souza Signed-off-by: Steve Dickson commit 3e81185037cf97990e4598218f56d92dd70d6269 Author: NeilBrown Date: Tue Oct 20 13:19:10 2020 -0400 clddb-tool was recently renamed to nfsdclddb. Unfortunately the nfsdcld man page wasn't told. Signed-off-by: NeilBrown Signed-off-by: Steve Dickson commit 6c23c48b54c442c295daa2554113f4af90525453 Author: Steve Dickson Date: Tue Oct 20 12:58:48 2020 -0400 gssd: Cleaned up the level 2 debugging statements Signed-off-by: Steve Dickson commit ebb4ed65ed423ceaa7a5fa48f2bd79b9d1668754 Author: Trond Myklebust Date: Fri Sep 18 14:14:22 2020 -0400 mountd: Ignore transient and non-fatal filesystem errors in nfsd_export If the mount point check in nfsd_export fails due to a transient error, then ignore it to avoid spurious NFSERR_STALE errors being returned by knfsd. Signed-off-by: Trond Myklebust Signed-off-by: Steve Dickson commit 482e72ba04bbeb703688d35486a252f2a2751771 Author: Srikrishan Malik Date: Thu Sep 17 14:10:30 2020 -0400 nfsidmap:umich_ldap return success only if attributes are found in ldap resp. Return ENOENT if the UID/GID attributes are not found in ldap response. Signed-off-by: Srikrishan Malik Signed-off-by: Steve Dickson commit 4585114420ab5fabf530f3c812ce4741f02d8cd5 Author: Kenneth D'souza Date: Tue Sep 8 10:07:04 2020 -0400 nfsiostat/mountstats: Drop autofs entries before calling compare_iostats() nfsiostat/mountstats can fail with below KeyError when old stat and new stat data go out of sync. $ mountstats iostat 1 3 Traceback (most recent call last): File "/usr/sbin/mountstats", line 1092, in res = main() File "/usr/sbin/mountstats", line 1081, in main return args.func(args) File "/usr/sbin/mountstats", line 965, in iostat_command print_iostat_summary(old_mountstats, mountstats, devices, sample_time) File "/usr/sbin/mountstats", line 920, in print_iostat_summary diff_stats = stats.compare_iostats(old_stats) File "/usr/sbin/mountstats", line 528, in compare_iostats if old_stats.__nfs_data['age'] > self.__nfs_data['age']: KeyError: 'age' Frequent mount and umount can cause autofs entries to be processed in compare_iostats. We need to filter the devices list and drop autofs entries to fix the issue. This way we pass only nfs mounts and not autofs entries. Signed-off-by: Kenneth D'souza Signed-off-by: Steve Dickson commit 086e6fdce887dd68e51b7bac4a2f21cea9a4fe01 Author: Steve Dickson Date: Fri Sep 4 14:15:53 2020 -0400 rpc.idmapd: Do not free config variables Commit 93e8f092e added a conf_cleanup() call to clean up memory after the config file was parsed. It turns out that memory still needed and it is not very much so the call is removed. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1873965 Signed-off-by: Steve Dickson commit 28588adef75d81cc4ae61d3ed010a7a12de748b1 Author: Steve Dickson Date: Mon Aug 31 12:03:18 2020 -0400 rpc.gssd: munmap_chunk(): invalid pointer Removed an errant call to gss_release_oid() to try and deal with memory leaks Signed-off-by: Steve Dickson commit d1683f356bd920d93f2db007902b2c46f97a2e49 Author: Signed-off-by: NeilBrown Date: Mon Aug 31 10:48:04 2020 -0400 Convert remaining python scripts to python3 nfs-utils contains 4 python scripts, two request /usr/bin/python3 in their shebang line, two request /usr/bin/python Those latter two run perfectly well with python3 and as python2 is on the way out, change them so they requrest /usr/bin/python3. Signed-off-by: NeilBrown Signed-off-by: Steve Dickson commit 4d5da01f926341bca97617e223656e3a90bcce5d Author: Kenneth D'souza Date: Mon Aug 31 10:45:36 2020 -0400 nfs-iostat: divide by zero with fresh mount When an export is freshly mounted, /proc/self/mountstats displays age = 0. This causes nfs-iostat to divide by zero throwing an error. When we have age = 0, other stats are greater than 0, so we'll set age = 1 and print the relevant stats. This will prevent a backtrace like this from occurring if nfsiostat is run. nfsiostat -s 1 Traceback (most recent call last): File "/usr/sbin/nfsiostat", line 662, in iostat_command(prog) File "/usr/sbin/nfsiostat", line 644, in iostat_command print_iostat_summary(old_mountstats, mountstats, devices, sample_time, options) File "/usr/sbin/nfsiostat", line 490, in print_iostat_summary devicelist.sort(key=lambda x: stats[x].ops(time), reverse=True) File "/usr/sbin/nfsiostat", line 490, in devicelist.sort(key=lambda x: stats[x].ops(time), reverse=True) File "/usr/sbin/nfsiostat", line 383, in ops return (sends / sample_time) ZeroDivisionError: float division by zero Signed-off-by: Kenneth D'souza Signed-off-by: Steve Dickson commit 574dd0ab54f0c97aba69661bd4410bd0773780a3 Author: Steve Dickson Date: Mon Aug 24 07:32:08 2020 -0400 rpc.idmapd: rework the verbosity of idmapd -v means only error -vv errors and informational messages -vvv all debugging messages will be displayed Signed-off-by: Steve Dickson commit 841abefc91ee870fe7cc8a4e36905b1655410c54 Author: Steve Dickson Date: Wed Aug 5 14:59:23 2020 -0400 rpc.idmapd: Turn down the verbosity in flush_inotify() Commit 27a8e146 introduce a debugging message that was not cover by a check if verbose is set, which cause a large number of message to be logged on every kerberos mount Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1867172 Signed-off-by: Steve Dickson commit 55fbd921b9ded5b5d341d6e07e1839a749648f97 Author: Doug Nazar Date: Thu Jul 23 14:08:31 2020 -0400 nfsidmap: Allow overriding location of method libraries Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 27a8e146f829cac5396be9fcd82d352faf64d213 Author: Doug Nazar Date: Thu Jul 23 14:01:25 2020 -0400 idmapd: Fix client mode support The inotify event was never rearmed, so we wouldn't get any notice after the first event. Even if it had been re-added, we never read the pending events so it would continously fire. Fix this by moving to persistent events and reading any pending inotify events. Effect was we'd leak any clients that existed after the first event. Switch from dnotify to inotify on the client dir if the idmap file isn't available yet. Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 93e8f092e7165b28fc804653b3897747d15d8906 Author: Steve Dickson Date: Mon Jul 27 10:39:42 2020 -0400 idmapd: Add graceful exit and resource cleanup Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 9bb4752e3141148995c110517472a298e80dfa44 Author: Doug Nazar Date: Thu Jul 23 13:45:52 2020 -0400 exportfs: Fix a few valgrind warnings Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit a5194cee26705e5239287b3c6a466b54ce38686c Author: Doug Nazar Date: Mon Jul 20 13:43:47 2020 -0400 svcgssd: Wait for nullrpc channel if not available Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 5d73b8fb23b4157c5b498180da941ca5801074ea Author: Doug Nazar Date: Mon Jul 20 13:40:42 2020 -0400 svcgssd: Cleanup global resources on exit Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 640714ab63a465028bf31781349bfe045d0a1b97 Author: Doug Nazar Date: Mon Jul 20 13:38:19 2020 -0400 nfsidmap: Add support to cleanup resources on exit Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 47c109c1a5b0b27df86cf77ca120b69e9693729d Author: Doug Nazar Date: Mon Jul 20 11:42:43 2020 -0400 svcgssd: Convert to using libevent Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 24c95f6bcc39dd1fb6f45924e5e88151863f71d6 Author: Doug Nazar Date: Mon Jul 20 11:37:27 2020 -0400 nfsdcld: Don't copy more data than exists in column Found with valgrind. Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 9a8cfad769937de9cb09326f457390ee73236d53 Author: Doug Nazar Date: Mon Jul 20 11:34:00 2020 -0400 nfsdcld: Add graceful exit handling and resource cleanup Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 092e0baa7726a3f215c91e21cc91ab8ab89ef7c7 Author: Doug Nazar Date: Mon Jul 20 11:31:18 2020 -0400 xlog: Reorganize xlog_backend() to work around -Wmaybe-uninitialized xlog.c: In function 'xlog_backend': xlog.c:202:3: warning: 'args2' may be used uninitialized in this function [-Wmaybe-uninitialized] 202 | vfprintf(stderr, fmt, args2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit f2c9748caa2fa3959f2b62b55e583193ff619e30 Author: Doug Nazar Date: Mon Jul 20 11:26:25 2020 -0400 gssd: srchost should never be * Fix silly mistake on my part due to a rebase error. Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 7c2d3617b98eb136a00f78c0ec0a3779c801c9e3 Author: Doug Nazar Date: Mon Jul 20 11:17:25 2020 -0400 gssd: Fix handling of failed allocations Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit dd49e94540799c662111db712eab6e19bd929c10 Author: Doug Nazar Date: Mon Jul 20 10:49:25 2020 -0400 Add error handling to libevent allocations. Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit e6b33560cd09b921e5cfe1537f0af620c4b86846 Author: Steve Dickson Date: Mon Jul 20 10:46:39 2020 -0400 gssd: explain the size need for the ccache buf Signed-off-by: Steve Dickson commit 735bc7205530cb2e3ce99d73e6d8a33819ff3e88 Author: Scott Mayhew Date: Wed Jul 15 13:54:52 2020 -0400 nfsdcld: Fix a few Coverity Scan CHECKED_RETURN errors. Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 0794a85fa03aec7d06594e1f9f5143282b0a6728 Author: Scott Mayhew Date: Wed Jul 15 13:53:04 2020 -0400 nfsdcld: Fix a few Coverity Scan CLANG_WARNING errors Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 213050a920d7d675eca24bc33262e55f184498ab Author: Scott Mayhew Date: Wed Jul 15 13:50:44 2020 -0400 nfsdcld: Fix a few Coverity Scan STRING_NULL errors Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 2694463567e85627bf7e37f46bd3458b27130080 Author: Scott Mayhew Date: Wed Jul 15 13:48:40 2020 -0400 nfsdcld: Fix a few Coverity Scan TOCTOU errors Calling stat() on recdirname so that we can see if it's a directory is unnecessary anyways, since opendir() will report an error if it's not. Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 08c68a7e8df38ebca2590d4c8771672bdb78e26b Author: Scott Mayhew Date: Wed Jul 15 13:46:50 2020 -0400 nfsdcld: Fix a few Coverity Scan RESOURCE_LEAK errors Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 39f5799828dfdc22ae133eda9527da1678a2fcdf Author: Kenneth D'souza Date: Tue Jul 14 14:53:39 2020 -0400 nfsiostat/mountstats: handle KeyError in compare_iostats() This will prevent a backtrace like this from occurring if nfsiostat is run with , eg: nfsiostat 1 3 This issue can occur if old_stats.__rpc_data['ops'] keys are not up to date with result.__rpc_data['ops']. I belive this issue can also affect mountstats due to similar code, hence fix it too. nfsiostat:217:compare_iostats:KeyError: 'NULL' Traceback (most recent call last): File "/usr/sbin/nfsiostat", line 649, in iostat_command(prog) File "/usr/sbin/nfsiostat", line 617, in iostat_command print_iostat_summary(old_mountstats, mountstats, devices, sample_time, options) File "/usr/sbin/nfsiostat", line 468, in print_iostat_summary diff_stats[device] = stats[device].compare_iostats(old_stats) File "/usr/sbin/nfsiostat", line 217, in compare_iostats difference, self.__rpc_data[op], old_stats.__rpc_data[op])) KeyError: 'NULL' Signed-off-by: Kenneth D'souza Signed-off-by: Steve Dickson commit df8fe8a6365c1703c364629ded9a3c2e50a3ad41 Author: Salvatore Bonaccorso Date: Tue Jul 14 14:51:19 2020 -0400 nfs-utils: systemd: nfs-server.service: Cleanup extra whitespaces Although whitespaces immediately before or after the "=" are ignored, removing the extra whitespaces in some of the key=value assignments makes the style more consistent. At least since systemd v242-rc1[1] this has been clarified that whitespaces immediately before and after the "=" are allowed. [1] https://github.com/systemd/systemd/commit/170342c90be07f418ab786718d95ef76289126a0 Signed-off-by: Salvatore Bonaccorso Signed-off-by: Steve Dickson commit 2590bce9659d5e500c0319e51156b2ec8db85157 Author: Steve Dickson Date: Tue Jul 14 14:07:18 2020 -0400 gssd: Reworked a couple debugging printfs Added thread_ids to the upcall debugging and turned off a fairly useless printf Signed-off-by: Steve Dickson commit b8092b05b64b0bef9d6226814e341e619848a9c6 Author: Doug Nazar Date: Tue Jul 14 13:49:56 2020 -0400 Fix various clang warnings. Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit c86594575ba7888125dade90a8793650a1fbfdb0 Author: Doug Nazar Date: Tue Jul 14 13:26:49 2020 -0400 gssd: We never use the nocache param of gssd_check_if_cc_exists() Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 73d21930229fc135b38d4f0bfe86e390e510156f Author: Doug Nazar Date: Tue Jul 14 13:22:12 2020 -0400 gssd: Lookup local hostname when srchost is '*' Currently when we receive a '*' srchost, we scan our keytab for a matching host but of course none match. We then fall back to scanning for any service/realm match and eventually find our hostname. Let's lookup our hostname instead and quickly find our specific match. Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 3ce80e89f83496d574fbc3dce1a5ee1f5b9a85df Author: Doug Nazar Date: Tue Jul 14 13:16:37 2020 -0400 gssd: Add a few debug statements to help track client_info lifetimes. Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 82e75b12c29c3d2d774d9c8a0ac79b5c19252307 Author: Doug Nazar Date: Tue Jul 14 13:13:33 2020 -0400 gssd: Fix locking for machine principal list Add missing locking for some scans of the global list. There was also no prevention of ple->ccname being changed concurrently so use the same lock to protect that. Reference counting was also added to ensure that the ple is not freed out from under us in the few places we now drop the lock while doing work. Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 75d0852892ca16e3bd17453753d3e34c73f1a1f9 Author: Doug Nazar Date: Tue Jul 14 13:07:11 2020 -0400 gssd: gssd_k5_err_msg() returns a strdup'd msg. Use free() to release. Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 82608566db1b1f4efdcf7a60bb0ba5e8eaefa403 Author: Doug Nazar Date: Tue Jul 14 12:29:33 2020 -0400 gssd: Cleanup on exit to support valgrind. Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 642262bf067df4c8359915ed513709b158aeb242 Author: Doug Nazar Date: Tue Jul 14 11:24:27 2020 -0400 Update to libevent 2.x apis Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson commit 07e4e94bf57b8d5a622cf4eef1c201df9899a5dd Author: Doug Nazar Date: Tue Jul 14 10:52:26 2020 -0400 gssd: Refcount struct clnt_info to protect multithread usage Struct clnt_info is shared with the various upcall threads so we need to ensure that it stays around even if the client dir gets removed. Reported-by: Sebastian Kraus Signed-off-by: Doug Nazar Signed-off-by: Steve Dickson