Patch to mount_nfs to make NFSMNT_RESVPORT default
Patch to mount_nfs to make NFSMNT_RESVPORT default
- Subject: Patch to mount_nfs to make NFSMNT_RESVPORT default
- From: Craig Rodrigues <email@hidden>
- Date: Thu, 12 May 2005 10:49:21 -0400
Hi,
Can someone comment on the attached patch?
This patch makes NFSMNT_RESVPORT a default
option for mount_nfs, which greatly
improves interoperability with Linux
and FreeBSD NFS servers.
I looked at the FreeBSD source code for mount_nfs,
and took the change directly from there, including the
new wording on the man page.
I am a bit new to Darwin, so how would I submit this
patch to Apple?
Thanks.
--
Craig Rodrigues
email@hidden
Index: src/diskdev_cmds/mount_nfs.tproj/mount_nfs.8
===================================================================
RCS file: /Volumes/src/cvs/od/src/diskdev_cmds/mount_nfs.tproj/mount_nfs.8,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 mount_nfs.8
--- src/diskdev_cmds/mount_nfs.tproj/mount_nfs.8 13 Dec 2003 15:34:40 -0000 1.1.1.3
+++ src/diskdev_cmds/mount_nfs.tproj/mount_nfs.8 12 May 2005 14:42:40 -0000
@@ -102,11 +102,15 @@
Any attempt to perform file locking operations on this mount will return
the error EOPNOTSUPP regardless of whether or not the NFS server supports
NFS file locking.
+.It Fl N
+Do
+.Em not
+use a reserved socket port number (see below).
.It Fl P
Use a reserved socket port number.
-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
+This flag is obsolete, and only retained for compatibility reasons.
+Reserved port numbers are used by default now.
+(For the rare case where the client has a trusted root account
but untrustworthy users and the network cables are in secure areas this does
help, but for normal desktop clients this does not apply.)
.It Fl R
Index: src/diskdev_cmds/mount_nfs.tproj/mount_nfs.c
===================================================================
RCS file: /Volumes/src/cvs/od/src/diskdev_cmds/mount_nfs.tproj/mount_nfs.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 mount_nfs.c
--- src/diskdev_cmds/mount_nfs.tproj/mount_nfs.c 13 Dec 2003 15:34:40 -0000 1.1.1.2
+++ src/diskdev_cmds/mount_nfs.tproj/mount_nfs.c 12 May 2005 14:42:41 -0000
@@ -149,7 +149,7 @@
0,
(u_char *)0,
0,
- NFSMNT_NFSV3,
+ NFSMNT_NFSV3 | NFSMNT_RESVPORT,
NFS_WSIZE,
NFS_RSIZE,
NFS_READDIRSIZE,
@@ -305,6 +305,9 @@
case 'l':
nfsargsp->flags |= NFSMNT_RDIRPLUS;
break;
+ case 'N':
+ nfsargsp->flags &= ~NFSMNT_RESVPORT;
+ break;
#ifdef NFSKERB
case 'm':
(void)strncpy(realm, optarg, REALM_SZ - 1);
@@ -361,7 +364,7 @@
altflags = 0;
break;
case 'P':
- nfsargsp->flags |= NFSMNT_RESVPORT;
+ /* obsolete for NFSMNT_RESVPORT, now default */
break;
#ifdef ISO
case 'p':
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden