diff options
author | Peter Wemm <peter@FreeBSD.org> | 2014-08-16 14:56:11 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2014-08-16 14:56:11 +0000 |
commit | 1b31334c642989da54f30f5647080d51cd7c81c2 (patch) | |
tree | 10df76db05b667d79154bfc075b79efc364e35ad /usr.bin | |
parent | a5b6123ea9425ac4094aa6c2a176c1d436543e5e (diff) | |
download | src-1b31334c642989da54f30f5647080d51cd7c81c2.tar.gz src-1b31334c642989da54f30f5647080d51cd7c81c2.zip |
Use mount protocol version 3 by default for showmount and umount.
mount_nfs effectively uses mount protocol v3 by default already.
v1 mount protocol is being removed along with nfsv2 by a high profile NFS
appliance vendor and our legacy v1 mount protocol usage causes rpc errors.
Notes
Notes:
svn path=/head/; revision=270062
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/showmount/showmount.8 | 9 | ||||
-rw-r--r-- | usr.bin/showmount/showmount.c | 7 |
2 files changed, 10 insertions, 6 deletions
diff --git a/usr.bin/showmount/showmount.8 b/usr.bin/showmount/showmount.8 index f49df8437f6a..106b1a18c2bb 100644 --- a/usr.bin/showmount/showmount.8 +++ b/usr.bin/showmount/showmount.8 @@ -31,7 +31,7 @@ .\" @(#)showmount.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd March 29, 1995 +.Dd August 16, 2014 .Dt SHOWMOUNT 8 .Os .Sh NAME @@ -41,6 +41,7 @@ .Nm .Op Fl a | d .Op Fl e +.Op Fl 1 .Op Fl 3 .Op Ar host .Sh DESCRIPTION @@ -76,10 +77,10 @@ List directory paths of mount points instead of hosts. Show the .Ar host Ns 's exports list. +.It Fl 1 +Use mount protocol Version 1, compatible with legacy servers. .It Fl 3 -Use mount protocol Version 3, compatible with -.Tn NFS -Version 3. +Ignored for backwards compatibility. .El .Sh SEE ALSO .Xr mount 8 , diff --git a/usr.bin/showmount/showmount.c b/usr.bin/showmount/showmount.c index 263525066800..d0da5705064c 100644 --- a/usr.bin/showmount/showmount.c +++ b/usr.bin/showmount/showmount.c @@ -110,11 +110,11 @@ main(int argc, char **argv) { register struct exportslist *exp; register struct grouplist *grp; - register int rpcs = 0, mntvers = 1; + register int rpcs = 0, mntvers = 3; const char *host; int ch, estat; - while ((ch = getopt(argc, argv, "ade3")) != -1) + while ((ch = getopt(argc, argv, "ade13")) != -1) switch (ch) { case 'a': if (type == 0) { @@ -133,6 +133,9 @@ main(int argc, char **argv) case 'e': rpcs |= DOEXPORTS; break; + case '1': + mntvers = 1; + break; case '3': mntvers = 3; break; |