diff --git a/SOURCES/nfs-utils-1.3.0-gssd-early-daemon.patch b/SOURCES/nfs-utils-1.3.0-gssd-early-daemon.patch new file mode 100644 index 0000000..b41bf2e --- /dev/null +++ b/SOURCES/nfs-utils-1.3.0-gssd-early-daemon.patch @@ -0,0 +1,17 @@ +diff -up nfs-utils-1.3.0/utils/gssd/gssd.c.orig nfs-utils-1.3.0/utils/gssd/gssd.c +--- nfs-utils-1.3.0/utils/gssd/gssd.c.orig 2020-04-24 11:48:07.182491964 -0400 ++++ nfs-utils-1.3.0/utils/gssd/gssd.c 2020-04-24 11:54:58.235059480 -0400 +@@ -1016,11 +1016,11 @@ main(int argc, char *argv[]) + "support setting debug level\n"); + #endif + ++ daemon_init(fg); ++ + if (gssd_check_mechs() != 0) + errx(1, "Problem with gssapi library"); + +- daemon_init(fg); +- + event_init(); + + pipefs_dir = opendir(pipefs_path); diff --git a/SOURCES/nfs-utils-1.3.0-mount-fallback.patch b/SOURCES/nfs-utils-1.3.0-mount-fallback.patch new file mode 100644 index 0000000..6263bf8 --- /dev/null +++ b/SOURCES/nfs-utils-1.3.0-mount-fallback.patch @@ -0,0 +1,32 @@ +diff -up nfs-utils-1.3.0/utils/mount/stropts.c.orig nfs-utils-1.3.0/utils/mount/stropts.c +--- nfs-utils-1.3.0/utils/mount/stropts.c.orig 2020-04-24 11:20:59.576467216 -0400 ++++ nfs-utils-1.3.0/utils/mount/stropts.c 2020-04-24 11:36:56.482047489 -0400 +@@ -851,7 +851,7 @@ out: + */ + static int nfs_autonegotiate(struct nfsmount_info *mi) + { +- int result; ++ int result, olderrno; + + result = nfs_try_mount_v4(mi); + check_result: +@@ -911,7 +911,18 @@ fall_back: + if (mi->version.v_mode == V_GENERAL) + /* v2,3 fallback not allowed */ + return result; +- return nfs_try_mount_v3v2(mi, FALSE); ++ ++ /* ++ * Save the original errno in case the v3 ++ * mount fails from one of the fall_back cases. ++ * Report the first failure not the v3 mount failure ++ */ ++ olderrno = errno; ++ if ((result = nfs_try_mount_v3v2(mi, FALSE))) ++ return result; ++ ++ errno = olderrno; ++ return result; + } + + /* diff --git a/SOURCES/nfs-utils-1.3.0-rpcgssd-closedir.patch b/SOURCES/nfs-utils-1.3.0-rpcgssd-closedir.patch new file mode 100644 index 0000000..9487d9b --- /dev/null +++ b/SOURCES/nfs-utils-1.3.0-rpcgssd-closedir.patch @@ -0,0 +1,11 @@ +diff -up nfs-utils-1.3.0/utils/gssd/gssd_main_loop.c.org nfs-utils-1.3.0/utils/gssd/gssd_main_loop.c +--- nfs-utils-1.3.0/utils/gssd/gssd_main_loop.c.org 2020-04-24 12:01:43.779578627 -0400 ++++ nfs-utils-1.3.0/utils/gssd/gssd_main_loop.c 2020-06-08 11:53:03.059066253 -0400 +@@ -175,6 +175,7 @@ topdirs_init_list(void) + } + if (TAILQ_EMPTY(&topdirs_list)) { + printerr(0, "ERROR: rpc_pipefs directory '%s' is empty!\n", pipefs_dir); ++ closedir(pipedir); + return -1; + } + closedir(pipedir); diff --git a/SPECS/nfs-utils.spec b/SPECS/nfs-utils.spec index d669e81..f1c5b09 100644 --- a/SPECS/nfs-utils.spec +++ b/SPECS/nfs-utils.spec @@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser Name: nfs-utils URL: http://sourceforge.net/projects/nfs Version: 1.3.0 -Release: 0.66%{?dist} +Release: 0.68%{?dist} Epoch: 1 # group all 32bit related archs @@ -162,9 +162,12 @@ Patch122: nfs-utils-1.3.0-smnotify-f-flag.patch Patch123: nfs-utils-1.3.0-statd-no-notify.patch Patch124: nfs-utils-1.3.0-mountd-memleak.patch # -# RHEL7.8-z +# RHEL7.9 # Patch125: nfs-utils-1.3.0-gssd-memleak.patch +Patch126: nfs-utils-1.3.0-mount-fallback.patch +Patch127: nfs-utils-1.3.0-gssd-early-daemon.patch +Patch128: nfs-utils-1.3.0-rpcgssd-closedir.patch Patch1000: nfs-utils-1.2.1-statdpath-man.patch Patch1001: nfs-utils-1.2.1-exp-subtree-warn-off.patch @@ -470,8 +473,14 @@ This package also contains the mount.nfs and umount.nfs program. %patch123 -p1 # 1711210 - rpc.mountd leaks memory %patch124 -p1 -# 1828185 - rpc.gssd uses a lot of memory with krb5 mounts [rhel-7.8.z] +# 1807110 - rpc.gssd uses a lot of memory with krb5 mounts %patch125 -p1 +# 1752329 - mount: report correct error in the fall_back cases as mounting... +%patch126 -p1 +# 1645083 - rpc.gssd crashes when gssproxy is used and the RPCSEC_GSS... +%patch127 -p1 +# 1167629 - [rpc.gssd] code defect: resource leak... +%patch128 -p1 %patch1000 -p1 %patch1001 -p1 @@ -724,8 +733,13 @@ fi /sbin/umount.nfs4 %changelog -* Mon Jun 15 2020 Steve Dickson 1.3.0-0.66_8 -- rpc.gssd: removed a number memory leaks (bz 1828185) +* Mon Jun 8 2020 Steve Dickson 1.3.0-0.68 +- gssd: closed resource leak. (bz 1167629) + +* Fri Apr 24 2020 Steve Dickson 1.3.0-0.67 +- rpc.gssd: removed a number memory leaks (bz 1807110) +- mount: Report correct error in the fall_back cases (bz 1752329) +- gssd: daemonize earlier (bz 1645083) * Mon Aug 5 2019 Steve Dickson 1.3.0-0.66 - nfs-utils_env.sh: Removed the hard coded number of nfsds (bz 1736801)