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