diff options
author | joerg <joerg@FreeBSD.org> | 1997-10-19 16:40:01 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1997-10-19 16:40:01 +0000 |
commit | 3f21e439b0000c3c0982adfa0b180455db95d8cf (patch) | |
tree | 47f90e5492a6eeca7e2db6b7dc3289b2ff89dde3 /sbin | |
parent | 00f77bac6a3a0adaaa4a6521db407d947796fd99 (diff) | |
download | FreeBSD-src-3f21e439b0000c3c0982adfa0b180455db95d8cf.zip FreeBSD-src-3f21e439b0000c3c0982adfa0b180455db95d8cf.tar.gz |
Introduce a -N option that disables the use of reserved ports, now
that -P is on by default. Remove do-nothing code in the -P case (but
leave the option itself for backward compatibility).
PR: bin/4500
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/mount_nfs/mount_nfs.8 | 10 | ||||
-rw-r--r-- | sbin/mount_nfs/mount_nfs.c | 9 |
2 files changed, 14 insertions, 5 deletions
diff --git a/sbin/mount_nfs/mount_nfs.8 b/sbin/mount_nfs/mount_nfs.8 index e81b017..9c92252 100644 --- a/sbin/mount_nfs/mount_nfs.8 +++ b/sbin/mount_nfs/mount_nfs.8 @@ -31,7 +31,7 @@ .\" .\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" -.\" $Id: mount_nfs.8,v 1.8 1997/03/11 12:31:54 peter Exp $ +.\" $Id: mount_nfs.8,v 1.9 1997/04/18 16:23:09 dfr Exp $ .\"" .Dd March 29, 1995 .Dt MOUNT_NFS 8 @@ -41,7 +41,7 @@ .Nd mount nfs file systems .Sh SYNOPSIS .Nm mount_nfs -.Op Fl 23KPTUbcdilqs +.Op Fl 23KNPTUbcdilqs .Op Fl D Ar deadthresh .Op Fl I Ar readdirsize .Op Fl L Ar leaseterm @@ -104,8 +104,14 @@ for more information.) Used with NQNFS to set the lease term to the specified number of seconds. Only use this argument for mounts with a large round trip delay. Values are normally in the 10-30 second range. +.It Fl N +Do +.Em not +use a reserved socket port number (see below). .It Fl P Use a reserved socket port number. +This flag is obsolete, and only retained for compatibility reasons. +Reserved port numbers are used by default now. This is useful for mounting servers that require clients to use a reserved port number on the mistaken belief that this makes NFS more secure. (For the rare case where the client has a trusted root account diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c index dda54c5..efe52a2 100644 --- a/sbin/mount_nfs/mount_nfs.c +++ b/sbin/mount_nfs/mount_nfs.c @@ -45,7 +45,7 @@ static char copyright[] = static char sccsid[] = "@(#)mount_nfs.c 8.11 (Berkeley) 5/4/95"; */ static const char rcsid[] = - "$Id: mount_nfs.c,v 1.22 1997/05/01 12:30:02 dfr Exp $"; + "$Id: mount_nfs.c,v 1.23 1997/06/03 13:49:26 dfr Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -269,7 +269,7 @@ main(argc, argv) nfsargs = nfsdefargs; nfsargsp = &nfsargs; while ((c = getopt(argc, argv, - "23a:bcdD:g:I:iKL:lm:o:PpqR:r:sTt:w:x:U")) != -1) + "23a:bcdD:g:I:iKL:lm:No:PpqR:r:sTt:w:x:U")) != -1) switch (c) { case '2': mountmode = V2; @@ -341,6 +341,9 @@ main(argc, argv) realm[REALM_SZ - 1] = '\0'; break; #endif + case 'N': + nfsargsp->flags &= ~NFSMNT_RESVPORT; + break; case 'o': altflags = 0; setflags(&altflags, &nfsargsp->flags, TRUE); @@ -375,7 +378,7 @@ main(argc, argv) mountmode = V3; break; case 'P': - nfsargsp->flags |= NFSMNT_RESVPORT; + /* obsolete for NFSMNT_RESVPORT, now default */ break; #ifdef ISO case 'p': |