From cb3fa4ca363883f85ed8b86030947f057ba9cfe0 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Tue, 6 Oct 2009 10:50:48 +0000 Subject: [PATCH] Fixed a whole where '-o v4' was not overriding the version in the conf file. --- nfs-utils-1.2.0-mntconf-vers.patch | 17 +++++++++-------- nfs-utils.spec | 6 +++++- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/nfs-utils-1.2.0-mntconf-vers.patch b/nfs-utils-1.2.0-mntconf-vers.patch index b2df1a0..4a5ba52 100644 --- a/nfs-utils-1.2.0-mntconf-vers.patch +++ b/nfs-utils-1.2.0-mntconf-vers.patch @@ -1,7 +1,7 @@ diff -up nfs-utils-1.2.0/utils/mount/configfile.c.orig nfs-utils-1.2.0/utils/mount/configfile.c ---- nfs-utils-1.2.0/utils/mount/configfile.c.orig 2009-09-30 11:38:53.745992000 -0400 -+++ nfs-utils-1.2.0/utils/mount/configfile.c 2009-09-30 13:49:38.480625000 -0400 -@@ -185,6 +185,19 @@ void free_all(void) +--- nfs-utils-1.2.0/utils/mount/configfile.c.orig 2009-10-02 11:10:01.000000000 -0400 ++++ nfs-utils-1.2.0/utils/mount/configfile.c 2009-10-02 11:14:30.000000000 -0400 +@@ -185,6 +185,20 @@ void free_all(void) free(entry); } } @@ -10,10 +10,11 @@ diff -up nfs-utils-1.2.0/utils/mount/configfile.c.orig nfs-utils-1.2.0/utils/mou +{ + int i; + -+ if (strcasecmp(field, "nfsvers") == 0 || -+ strcasecmp(field, "vers") == 0) { -+ for (i=0; versions[i]; i++) -+ if (strncasecmp(mopt, versions[i], strlen(versions[i])) == 0) ++ if (strncmp("mountvers", field, strlen("mountvers") != 0 && ++ (strcasecmp(field, "nfsvers") == 0 || ++ strcasecmp(field, "vers") == 0))) { ++ for (i=0; versions[i]; i++) ++ if (strcasestr(mopt, versions[i]) != NULL) + return 1; + } + return 0; @@ -21,7 +22,7 @@ diff -up nfs-utils-1.2.0/utils/mount/configfile.c.orig nfs-utils-1.2.0/utils/mou /* * Parse the given section of the configuration * file to if there are any mount options set. -@@ -207,6 +220,12 @@ conf_parse_mntopts(char *section, char * +@@ -207,6 +221,12 @@ conf_parse_mntopts(char *section, char * snprintf(buf, BUFSIZ, "%s=", node->field); if (opts && strcasestr(opts, buf) != NULL) continue; diff --git a/nfs-utils.spec b/nfs-utils.spec index 8157ddb..3880810 100644 --- a/nfs-utils.spec +++ b/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.2.0 -Release: 15%{?dist} +Release: 16%{?dist} Epoch: 1 # group all 32bit related archs @@ -268,6 +268,10 @@ fi %attr(4755,root,root) /sbin/umount.nfs4 %changelog +* Mon Oct 5 2009 Steve Dickson 1.2.0-16 +- Fixed a whole where '-o v4' was not overriding the + version in the conf file. + * Wed Sep 30 2009 Steve Dickson 1.2.0-15 - Change the nfsmount.conf file to define v3 as the default protocol version.