• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Patch to mount_nfs to make NFSMNT_RESVPORT default
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Patch to mount_nfs to make NFSMNT_RESVPORT default
      • From: Craig Rodrigues <email@hidden>
    • Re: Patch to mount_nfs to make NFSMNT_RESVPORT default
      • From: Mike Mackovitch <email@hidden>
    • Re: Patch to mount_nfs to make NFSMNT_RESVPORT default
      • From: Markus Hitter <email@hidden>
  • Prev by Date: Re: launchd checkin
  • Next by Date: mutex PTHREAD_MUTEX_ERRORCHECK and pthread_cancel issues
  • Previous by thread: CFMessagePortSendRequest + kCFRunLoopDefaultMode + Dsitributed notification
  • Next by thread: Re: Patch to mount_nfs to make NFSMNT_RESVPORT default
  • Index(es):
    • Date
    • Thread