From 1e08c017977a34b472745df8600588e04683e5a8 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 06 2018 18:38:33 +0000 Subject: import nfs-utils-1.3.0-0.48.el7_4.2 --- diff --git a/SOURCES/nfs-utils-1.3.0-mount-minorversion.patch b/SOURCES/nfs-utils-1.3.0-mount-minorversion.patch new file mode 100644 index 0000000..2bb7792 --- /dev/null +++ b/SOURCES/nfs-utils-1.3.0-mount-minorversion.patch @@ -0,0 +1,61 @@ +commit 845c87b67b7bfd60127e23d1df93a94ceb9d3d18 +Author: NeilBrown +Date: Wed Jul 26 13:51:51 2017 -0400 + + mount: Fix problems with parsing minorversion= + + 1/ minorversion=0 is not recognized, as errors from + strtol() are not correctly detected. + 2/ when there is an error in the minorversion= value, + no message is presented. + 3/ Current code recognizes "minorversion" and sets V_SPECIFIC, + but then because *cptr == '\0', the v_mode is reset to V_GENERAL. + This results in minorversion negotiation, which is not wanted. + + This patch addresses all of these. + + Signed-off-by: NeilBrown + Signed-off-by: Steve Dickson + (cherry picked from commit 050153ef6a86ff5ab06ef65be36336824a323779) + +diff --git a/utils/mount/network.c b/utils/mount/network.c +index b2e4374..b64c526 100644 +--- a/utils/mount/network.c ++++ b/utils/mount/network.c +@@ -1283,13 +1283,19 @@ nfs_nfs_version(struct mount_options *options, struct nfs_version *version) + if (!version_val) + goto ret_error; + +- if (!(version->major = strtol(version_val, &cptr, 10))) ++ version->major = strtol(version_val, &cptr, 10); ++ if (cptr == version_val || (*cptr && *cptr != '.')) + goto ret_error; +- +- if (version->major < 4) ++ if (version->major == 4 && *cptr != '.' && ++ (version_val = po_get(options, "minorversion")) != NULL) { ++ version->minor = strtol(version_val, &cptr, 10); ++ i = -1; ++ if (*cptr) ++ goto ret_error; + version->v_mode = V_SPECIFIC; +- +- if (*cptr == '.') { ++ } else if (version->major < 4) ++ version->v_mode = V_SPECIFIC; ++ else if (*cptr == '.') { + version_val = ++cptr; + if (!(version->minor = strtol(version_val, &cptr, 10)) && cptr == version_val) + goto ret_error; +@@ -1303,7 +1309,10 @@ nfs_nfs_version(struct mount_options *options, struct nfs_version *version) + return 1; + + ret_error: +- if (i <= 2 ) { ++ if (i < 0) { ++ nfs_error(_("%s: parsing error on 'minorversion=' option"), ++ progname); ++ } else if (i <= 2 ) { + nfs_error(_("%s: parsing error on 'v' option"), + progname); + } else if (i == 3 ) { diff --git a/SPECS/nfs-utils.spec b/SPECS/nfs-utils.spec index 8becce8..81b6fbf 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.48%{?dist}.1 +Release: 0.48%{?dist}.2 Epoch: 1 # group all 32bit related archs @@ -130,11 +130,12 @@ Patch097: nfs-utils-1.3.0-exportfs-path-comp.patch # Patch098: nfs-utils-1.3.0-mount-addressfailed.patch Patch099: nfs-utils-1.3.0-mount-eacces.patch +Patch100: nfs-utils-1.3.0-mount-minorversion.patch -Patch100: nfs-utils-1.2.1-statdpath-man.patch -Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch -Patch102: nfs-utils-1.2.3-sm-notify-res_init.patch -Patch103: nfs-utils-1.2.5-idmap-errmsg.patch +Patch1000: nfs-utils-1.2.1-statdpath-man.patch +Patch1001: nfs-utils-1.2.1-exp-subtree-warn-off.patch +Patch1002: nfs-utils-1.2.3-sm-notify-res_init.patch +Patch1003: nfs-utils-1.2.5-idmap-errmsg.patch Group: System Environment/Daemons Provides: exportfs = %{epoch}:%{version}-%{release} @@ -385,11 +386,13 @@ This package also contains the mount.nfs and umount.nfs program. %patch098 -p1 # 1518718 - RHEL7.4: NFS mount to DELL/EMC Isilon servers fails... %patch099 -p1 - +# 1547681 - nfs-utils: minorversion can't work %patch100 -p1 -%patch101 -p1 -%patch102 -p1 -%patch103 -p1 + +%patch1000 -p1 +%patch1001 -p1 +%patch1002 -p1 +%patch1003 -p1 # Remove .orig files find . -name "*.orig" | xargs rm -f @@ -636,6 +639,9 @@ fi /sbin/umount.nfs4 %changelog +* Thu Feb 22 2018 Steve Dickson 1.3.0-0.48_4.2 +- mount: Fix problems with parsing minorversion= (bz 1547681) + * Thu Nov 30 2017 Steve Dickson 1.3.0-0.48_4.1 - mount: handle EACCES during version negotiation (bz 1518718)