diff --git a/SOURCES/nfs-utils-1.3.0-exportfs-root.patch b/SOURCES/nfs-utils-1.3.0-exportfs-root.patch new file mode 100644 index 0000000..5c9dc1b --- /dev/null +++ b/SOURCES/nfs-utils-1.3.0-exportfs-root.patch @@ -0,0 +1,12 @@ +diff -up nfs-utils-1.3.0/utils/exportfs/exportfs.c.orig nfs-utils-1.3.0/utils/exportfs/exportfs.c +--- nfs-utils-1.3.0/utils/exportfs/exportfs.c.orig 2021-06-09 15:00:18.819488256 -0400 ++++ nfs-utils-1.3.0/utils/exportfs/exportfs.c 2021-06-09 15:06:28.804755411 -0400 +@@ -417,7 +417,7 @@ unexportfs_parsed(char *hname, char *pat + * so need to deal with it. + */ + size_t nlen = strlen(path); +- while (path[nlen - 1] == '/') ++ while ((nlen > 1) && (path[nlen - 1] == '/')) + nlen--; + + for (exp = exportlist[htype].p_head; exp; exp = exp->m_next) { diff --git a/SPECS/nfs-utils.spec b/SPECS/nfs-utils.spec index f1c5b09..1a77331 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.68%{?dist} +Release: 0.68%{?dist}.1 Epoch: 1 # group all 32bit related archs @@ -168,6 +168,10 @@ 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 +# +# RHEL7.9.z +# +Patch129: nfs-utils-1.3.0-exportfs-root.patch Patch1000: nfs-utils-1.2.1-statdpath-man.patch Patch1001: nfs-utils-1.2.1-exp-subtree-warn-off.patch @@ -481,6 +485,8 @@ This package also contains the mount.nfs and umount.nfs program. %patch127 -p1 # 1167629 - [rpc.gssd] code defect: resource leak... %patch128 -p1 +# 1958975 - exportfs: unable to unexport root +%patch129 -p1 %patch1000 -p1 %patch1001 -p1 @@ -733,6 +739,9 @@ fi /sbin/umount.nfs4 %changelog +* Wed Jun 9 2020 Steve Dickson 1.3.0-0.68.1 +- exportfs: fix unexporting of '/' (bz 1958975) + * Mon Jun 8 2020 Steve Dickson 1.3.0-0.68 - gssd: closed resource leak. (bz 1167629)