|
|
e19a30 |
diff -up nfs-utils-1.3.0/nfs.conf.orig nfs-utils-1.3.0/nfs.conf
|
|
|
e19a30 |
--- nfs-utils-1.3.0/nfs.conf.orig 2017-06-19 11:15:31.661716122 -0400
|
|
|
e19a30 |
+++ nfs-utils-1.3.0/nfs.conf 2017-06-19 11:15:51.945058695 -0400
|
|
|
e19a30 |
@@ -66,6 +66,3 @@
|
|
|
e19a30 |
# outgoing-port=
|
|
|
e19a30 |
# outgoing-addr=
|
|
|
e19a30 |
# lift-grace=y
|
|
|
e19a30 |
-#
|
|
|
e19a30 |
-#[svcgssd]
|
|
|
e19a30 |
-# principal=
|
|
|
e19a30 |
diff -up nfs-utils-1.3.0/utils/mount/stropts.c.orig nfs-utils-1.3.0/utils/mount/stropts.c
|
|
|
e19a30 |
--- nfs-utils-1.3.0/utils/mount/stropts.c.orig 2017-06-19 11:15:31.667716223 -0400
|
|
|
e19a30 |
+++ nfs-utils-1.3.0/utils/mount/stropts.c 2017-06-19 11:25:53.000204600 -0400
|
|
|
e19a30 |
@@ -73,6 +73,13 @@
|
|
|
e19a30 |
#define NFS_DEF_BG_TIMEOUT_MINUTES (10000u)
|
|
|
e19a30 |
#endif
|
|
|
e19a30 |
|
|
|
e19a30 |
+#ifndef NFS_DEFAULT_MAJOR
|
|
|
e19a30 |
+#define NFS_DEFAULT_MAJOR 4
|
|
|
e19a30 |
+#endif
|
|
|
e19a30 |
+#ifndef NFS_DEFAULT_MINOR
|
|
|
e19a30 |
+#define NFS_DEFAULT_MINOR 1
|
|
|
e19a30 |
+#endif
|
|
|
e19a30 |
+
|
|
|
e19a30 |
extern int nfs_mount_data_version;
|
|
|
e19a30 |
extern char *progname;
|
|
|
e19a30 |
extern int verbose;
|
|
|
e19a30 |
@@ -111,20 +118,28 @@ static void nfs_default_version(struct n
|
|
|
e19a30 |
if (mi->version.v_mode == V_DEFAULT &&
|
|
|
e19a30 |
config_default_vers.v_mode != V_DEFAULT) {
|
|
|
e19a30 |
mi->version.major = config_default_vers.major;
|
|
|
e19a30 |
- mi->version.minor = config_default_vers.minor;
|
|
|
e19a30 |
+ if (config_default_vers.v_mode == V_SPECIFIC)
|
|
|
e19a30 |
+ mi->version.minor = config_default_vers.minor;
|
|
|
e19a30 |
+ else
|
|
|
e19a30 |
+ mi->version.minor = NFS_DEFAULT_MINOR;
|
|
|
e19a30 |
return;
|
|
|
e19a30 |
}
|
|
|
e19a30 |
|
|
|
e19a30 |
if (mi->version.v_mode == V_GENERAL) {
|
|
|
e19a30 |
if (config_default_vers.v_mode != V_DEFAULT &&
|
|
|
e19a30 |
- mi->version.major == config_default_vers.major)
|
|
|
e19a30 |
- mi->version.minor = config_default_vers.minor;
|
|
|
e19a30 |
+ mi->version.major == config_default_vers.major) {
|
|
|
e19a30 |
+ if (config_default_vers.v_mode == V_SPECIFIC)
|
|
|
e19a30 |
+ mi->version.minor = config_default_vers.minor;
|
|
|
e19a30 |
+ else
|
|
|
e19a30 |
+ mi->version.minor = NFS_DEFAULT_MINOR;
|
|
|
e19a30 |
+ } else
|
|
|
e19a30 |
+ mi->version.minor = NFS_DEFAULT_MINOR;
|
|
|
e19a30 |
return;
|
|
|
e19a30 |
}
|
|
|
e19a30 |
|
|
|
e19a30 |
#endif /* MOUNT_CONFIG */
|
|
|
e19a30 |
- mi->version.major = 4;
|
|
|
e19a30 |
- mi->version.minor = 1;
|
|
|
e19a30 |
+ mi->version.major = NFS_DEFAULT_MAJOR;
|
|
|
e19a30 |
+ mi->version.minor = NFS_DEFAULT_MINOR;
|
|
|
e19a30 |
}
|
|
|
e19a30 |
|
|
|
e19a30 |
/*
|
|
|
e19a30 |
@@ -314,7 +329,9 @@ static int nfs_set_version(struct nfsmou
|
|
|
e19a30 |
return 0;
|
|
|
e19a30 |
|
|
|
e19a30 |
if (strncmp(mi->type, "nfs4", 4) == 0) {
|
|
|
e19a30 |
- mi->version.major = 4;
|
|
|
e19a30 |
+ /* Set to default values */
|
|
|
e19a30 |
+ mi->version.major = NFS_DEFAULT_MAJOR;
|
|
|
e19a30 |
+ mi->version.minor = NFS_DEFAULT_MINOR;
|
|
|
e19a30 |
mi->version.v_mode = V_GENERAL;
|
|
|
e19a30 |
}
|
|
|
e19a30 |
/*
|
|
|
e19a30 |
@@ -750,13 +767,9 @@ static int nfs_do_mount_v4(struct nfsmou
|
|
|
e19a30 |
}
|
|
|
e19a30 |
|
|
|
e19a30 |
if (mi->version.v_mode != V_SPECIFIC) {
|
|
|
e19a30 |
- if (mi->version.v_mode == V_GENERAL)
|
|
|
e19a30 |
- snprintf(version_opt, sizeof(version_opt) - 1,
|
|
|
e19a30 |
- "vers=%lu", mi->version.major);
|
|
|
e19a30 |
- else
|
|
|
e19a30 |
- snprintf(version_opt, sizeof(version_opt) - 1,
|
|
|
e19a30 |
- "vers=%lu.%lu", mi->version.major,
|
|
|
e19a30 |
- mi->version.minor);
|
|
|
e19a30 |
+ snprintf(version_opt, sizeof(version_opt) - 1,
|
|
|
e19a30 |
+ "vers=%lu.%lu", mi->version.major,
|
|
|
e19a30 |
+ mi->version.minor);
|
|
|
e19a30 |
|
|
|
e19a30 |
if (po_append(options, version_opt) == PO_FAILED) {
|
|
|
e19a30 |
errno = EINVAL;
|