Blame SOURCES/nfs-utils-2.5.4-mount-nov2.patch

00e421
diff --git a/nfs.conf b/nfs.conf
b9598b
index 8c714ff7..21d3e7b2 100644
00e421
--- a/nfs.conf
00e421
+++ b/nfs.conf
b9598b
@@ -68,7 +68,6 @@
00e421
 # lease-time=90
00e421
 # udp=n
00e421
 # tcp=y
00e421
-# vers2=n
00e421
 # vers3=y
00e421
 # vers4=y
00e421
 # vers4.0=y
b9598b
diff --git a/systemd/nfs.conf.man b/systemd/nfs.conf.man
b9598b
index 4436a38a..be487a11 100644
b9598b
--- a/systemd/nfs.conf.man
b9598b
+++ b/systemd/nfs.conf.man
b9598b
@@ -171,7 +171,6 @@ Recognized values:
b9598b
 .BR lease-time ,
b9598b
 .BR udp ,
b9598b
 .BR tcp ,
b9598b
-.BR vers2 ,
b9598b
 .BR vers3 ,
b9598b
 .BR vers4 ,
b9598b
 .BR vers4.0 ,
00e421
diff --git a/utils/mount/configfile.c b/utils/mount/configfile.c
00e421
index 3d3684ef..1d88cbfc 100644
00e421
--- a/utils/mount/configfile.c
00e421
+++ b/utils/mount/configfile.c
00e421
@@ -71,7 +71,7 @@ struct mnt_alias {
00e421
 int mnt_alias_sz = (sizeof(mnt_alias_tab)/sizeof(mnt_alias_tab[0]));
00e421
 
00e421
 static const char *version_keys[] = {
00e421
-	"v2", "v3", "v4", "vers", "nfsvers", "minorversion", NULL
00e421
+	"v3", "v4", "vers", "nfsvers", "minorversion", NULL
00e421
 };
00e421
 
00e421
 static int strict;
00e421
diff --git a/utils/mount/mount.nfs.man b/utils/mount/mount.nfs.man
00e421
index 0409c96f..a78a3b0d 100644
00e421
--- a/utils/mount/mount.nfs.man
00e421
+++ b/utils/mount/mount.nfs.man
00e421
@@ -27,7 +27,7 @@ can mount all NFS file system versions.  Under earlier Linux kernel versions,
00e421
 .BR mount.nfs4
00e421
 must be used for mounting NFSv4 file systems while
00e421
 .BR mount.nfs
00e421
-must be used for NFSv3 and v2.
00e421
+must be used for NFSv3.
00e421
 
00e421
 .SH OPTIONS
00e421
 .TP
00e421
diff --git a/utils/mount/network.c b/utils/mount/network.c
00e421
index e803dbbe..0d80d08c 100644
00e421
--- a/utils/mount/network.c
00e421
+++ b/utils/mount/network.c
00e421
@@ -97,7 +97,7 @@ static const char *nfs_transport_opttbl[] = {
00e421
 };
00e421
 
00e421
 static const char *nfs_version_opttbl[] = {
00e421
-	"v2",
00e421
+	"v2", /* no longer supported */
00e421
 	"v3",
00e421
 	"v4",
00e421
 	"vers",
00e421
@@ -1290,7 +1290,7 @@ nfs_nfs_version(char *type, struct mount_options *options, struct nfs_version *v
00e421
 	else if (found < 0)
00e421
 		return 1;
00e421
 	else if (found <= 2 ) {
00e421
-		/* v2, v3, v4 */
00e421
+		/* v3, v4 */
00e421
 		version_val = version_key + 1;
00e421
 		version->v_mode = V_SPECIFIC;
00e421
 	} else if (found > 2 ) {
00e421
diff --git a/utils/mount/nfs.man b/utils/mount/nfs.man
00e421
index f1b76936..83365a37 100644
00e421
--- a/utils/mount/nfs.man
00e421
+++ b/utils/mount/nfs.man
00e421
@@ -12,7 +12,7 @@ created by Sun Microsystems in 1984. NFS was developed
00e421
 to allow file sharing between systems residing
00e421
 on a local area network.
00e421
 Depending on kernel configuration, the Linux NFS client may
00e421
-support NFS versions 2, 3, 4.0, 4.1, or 4.2.
00e421
+support NFS versions 3, 4.0, 4.1, or 4.2.
00e421
 .P
00e421
 The
00e421
 .BR mount (8)
00e421
@@ -941,11 +941,6 @@ file. See
00e421
 .BR nfsmount.conf(5)
00e421
 for details.
00e421
 .SH EXAMPLES
00e421
-To mount an export using NFS version 2,
00e421
-use the
00e421
-.B nfs
00e421
-file system type and specify the
00e421
-.B nfsvers=2
00e421
 mount option.
00e421
 To mount using NFS version 3,
00e421
 use the
00e421
@@ -972,13 +967,6 @@ reasonable defaults for NFS behavior.
00e421
 	server:/export	/mnt	nfs	defaults	0 0
00e421
 .fi
00e421
 .P
00e421
-Here is an example from an /etc/fstab file for an NFS version 2 mount over UDP.
00e421
-.P
00e421
-.nf
00e421
-.ta 8n +16n +6n +6n +30n
00e421
-	server:/export	/mnt	nfs	nfsvers=2,proto=udp	0 0
00e421
-.fi
00e421
-.P
00e421
 This example shows how to mount using NFS version 4 over TCP
00e421
 with Kerberos 5 mutual authentication.
00e421
 .P
00e421
@@ -1071,7 +1059,7 @@ and
00e421
 can safely be allowed to default to the largest values supported by
00e421
 both client and server, independent of the network's MTU size.
00e421
 .SS "Using the mountproto mount option"
00e421
-This section applies only to NFS version 2 and version 3 mounts
00e421
+This section applies only to NFS version 3 mounts
00e421
 since NFS version 4 does not use a separate protocol for mount
00e421
 requests.
00e421
 .P
00e421
@@ -1474,7 +1462,7 @@ the use of the
00e421
 mount option.
00e421
 .SS "Using file locks with NFS"
00e421
 The Network Lock Manager protocol is a separate sideband protocol
00e421
-used to manage file locks in NFS version 2 and version 3.
00e421
+used to manage file locks in NFS version 3.
00e421
 To support lock recovery after a client or server reboot,
00e421
 a second sideband protocol --
00e421
 known as the Network Status Manager protocol --
00e421
@@ -1894,8 +1882,6 @@ RFC 768 for the UDP specification.
00e421
 .br
00e421
 RFC 793 for the TCP specification.
00e421
 .br
00e421
-RFC 1094 for the NFS version 2 specification.
00e421
-.br
00e421
 RFC 1813 for the NFS version 3 specification.
00e421
 .br
00e421
 RFC 1832 for the XDR specification.
00e421
diff --git a/utils/mount/nfsmount.conf b/utils/mount/nfsmount.conf
00e421
index 6bdc225a..342063f7 100644
00e421
--- a/utils/mount/nfsmount.conf
00e421
+++ b/utils/mount/nfsmount.conf
00e421
@@ -28,7 +28,7 @@
00e421
 # This statically named section defines global mount 
00e421
 # options that can be applied on all NFS mount.
00e421
 #
00e421
-# Protocol Version [2,3,4]
00e421
+# Protocol Version [3,4]
00e421
 # This defines the default protocol version which will
00e421
 # be used to start the negotiation with the server.
00e421
 # Defaultvers=4
00e421
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
00e421
index fa67a66f..3c4e218a 100644
00e421
--- a/utils/mount/stropts.c
00e421
+++ b/utils/mount/stropts.c
00e421
@@ -357,6 +357,7 @@ static int nfs_insert_sloppy_option(struct mount_options *options)
00e421
 
00e421
 static int nfs_set_version(struct nfsmount_info *mi)
00e421
 {
00e421
+
00e421
 	if (!nfs_nfs_version(mi->type, mi->options, &mi->version))
00e421
 		return 0;
00e421
 
00e421
@@ -1016,7 +1017,6 @@ static int nfs_try_mount(struct nfsmount_info *mi)
00e421
 	}
00e421
 
00e421
 	switch (mi->version.major) {
00e421
-		case 2:
00e421
 		case 3:
00e421
 			result = nfs_try_mount_v3v2(mi, FALSE);
00e421
 			break;
00e421
@@ -1247,6 +1247,14 @@ static int nfsmount_start(struct nfsmount_info *mi)
00e421
 	if (!nfs_validate_options(mi))
00e421
 		return EX_FAIL;
00e421
 
00e421
+	/* 
00e421
+	 * NFS v2 has been deprecated
00e421
+	 */
00e421
+	if (mi->version.major == 2) {
00e421
+		mount_error(mi->spec, mi->node, EOPNOTSUPP);
00e421
+		return EX_FAIL;
00e421
+	}
00e421
+
00e421
 	/*
00e421
 	 * Avoid retry and negotiation logic when remounting
00e421
 	 */
b9598b
diff --git a/utils/mountd/mountd.man b/utils/mountd/mountd.man
b9598b
index 77e6299a..a206a3e2 100644
b9598b
--- a/utils/mountd/mountd.man
b9598b
+++ b/utils/mountd/mountd.man
b9598b
@@ -286,10 +286,9 @@ The values recognized in the
b9598b
 section include
b9598b
 .BR TCP ,
b9598b
 .BR UDP ,
b9598b
-.BR vers2 ,
b9598b
 .BR vers3 ", and"
b9598b
 .B vers4
b9598b
-which each have same same meaning as given by
b9598b
+which each have the same meaning as given by
b9598b
 .BR rpc.nfsd (8).
b9598b
 
b9598b
 .SH TCP_WRAPPERS SUPPORT
00e421
diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c
00e421
index b0741718..4016a761 100644
00e421
--- a/utils/nfsd/nfsd.c
00e421
+++ b/utils/nfsd/nfsd.c
00e421
@@ -226,7 +226,6 @@ main(int argc, char **argv)
00e421
 				}
00e421
 				/* FALLTHRU */
00e421
 			case 3:
00e421
-			case 2:
00e421
 				NFSCTL_VERUNSET(versbits, c);
00e421
 				break;
00e421
 			default:
00e421
@@ -251,7 +250,6 @@ main(int argc, char **argv)
00e421
 					minorvers = minorversset = minormask;
00e421
 				/* FALLTHRU */
00e421
 			case 3:
00e421
-			case 2:
00e421
 				NFSCTL_VERSET(versbits, c);
00e421
 				break;
00e421
 			default:
00e421
diff --git a/utils/nfsd/nfsd.man b/utils/nfsd/nfsd.man
b9598b
index 2701ba78..634b8a63 100644
00e421
--- a/utils/nfsd/nfsd.man
00e421
+++ b/utils/nfsd/nfsd.man
00e421
@@ -57,7 +57,7 @@ This option can be used to request that
00e421
 .B rpc.nfsd
00e421
 does not offer certain versions of NFS. The current version of
00e421
 .B rpc.nfsd
00e421
-can support major NFS versions 2,3,4 and the minor versions 4.0, 4.1 and 4.2.
00e421
+can support major NFS versions 3,4 and the minor versions 4.0, 4.1 and 4.2.
00e421
 .TP
00e421
 .B \-s " or " \-\-syslog
00e421
 By default,
00e421
@@ -84,7 +84,7 @@ This option can be used to request that
00e421
 .B rpc.nfsd
00e421
 offer certain versions of NFS. The current version of
00e421
 .B rpc.nfsd
00e421
-can support major NFS versions 2,3,4 and the minor versions 4.0, 4.1 and 4.2.
00e421
+can support major NFS versions 3,4 and the minor versions 4.0, 4.1 and 4.2.
00e421
 .TP
00e421
 .B \-L " or " \-\-lease-time seconds
00e421
 Set the lease-time used for NFSv4.  This corresponds to how often
b9598b
@@ -156,8 +156,6 @@ Enable (with "on" or "yes" etc) or disable ("off", "no") UDP support.
b9598b
 .B TCP
b9598b
 Enable or disable TCP support.
b9598b
 .TP
b9598b
-.B vers2
b9598b
-.TP
b9598b
 .B vers3
b9598b
 .TP
b9598b
 .B vers4