summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Coddington <bcodding@redhat.com>2014-12-08 15:43:34 -0500
committerSteve Dickson <steved@redhat.com>2015-01-23 14:08:19 -0500
commit7d2bdbcf5894149f2ef5eb61041e5ff51a2aa1ad (patch)
treef750f2d008e6680c5e7d08df05254b0266c28ea9
parent5bea22e33b7a0f1d2348100cbefbe45dd49cb23d (diff)
downloadnfs-utils-7d2bdbcf5894149f2ef5eb61041e5ff51a2aa1ad.tar.gz
nfs-utils-7d2bdbcf5894149f2ef5eb61041e5ff51a2aa1ad.tar.xz
nfs-utils-7d2bdbcf5894149f2ef5eb61041e5ff51a2aa1ad.zip
nfsmount.conf: Always parse versions
In order to make decisions about which default version to use when only the major version is specified, the nfsmount.conf Defaultvers options should always be parsed, even when a version has already been specified. Remove the check and bypass for parsing the Defaultvers options from nfsmount.conf. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--utils/mount/configfile.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/utils/mount/configfile.c b/utils/mount/configfile.c
index a0072f1..0a4cc04 100644
--- a/utils/mount/configfile.c
+++ b/utils/mount/configfile.c
@@ -228,35 +228,6 @@ void free_all(void)
free(entry);
}
}
-static char *versions[] = {"v2", "v3", "v4", "vers", "nfsvers", NULL};
-static int
-check_vers(char *mopt, char *field)
-{
- int i, found=0;
-
- /*
- * First check to see if the config setting is one
- * of the many version settings
- */
- for (i=0; versions[i]; i++) {
- if (strcasestr(field, versions[i]) != NULL) {
- found++;
- break;
- }
- }
- if (!found)
- return 0;
- /*
- * It appears the version is being set, now see
- * if the version appears on the command
- */
- for (i=0; versions[i]; i++) {
- if (strcasestr(mopt, versions[i]) != NULL)
- return 1;
- }
-
- return 0;
-}
struct nfs_version config_default_vers;
unsigned long config_default_proto;
@@ -331,11 +302,6 @@ conf_parse_mntopts(char *section, char *arg, char *opts)
snprintf(buf, BUFSIZ, "%s=", node->field);
if (opts && strcasestr(opts, buf) != NULL)
continue;
- /*
- * Protocol verions can be set in a number of ways
- */
- if (opts && check_vers(opts, node->field))
- continue;
if (lookup_entry(node->field) != NULL)
continue;