3
0
forked from pool/util-linux
util-linux/mount-nfs-nonreserved

62 lines
2.3 KiB
Plaintext

diff -u util-linux-2.11z/mount/nfsmount.c-o util-linux-2.11z/mount/nfsmount.c
--- util-linux-2.11z/mount/nfsmount.c-o 2003-06-18 15:23:06.000000000 +0200
+++ util-linux-2.11z/mount/nfsmount.c 2003-06-18 15:25:35.000000000 +0200
@@ -215,7 +215,7 @@
} status;
struct stat statbuf;
char *s;
- int port, mountport, proto, bg, soft, intr;
+ int port, mountport, proto, bg, soft, intr, nonreserved;
int posix, nocto, noac, nolock, broken_suid, noacl;
int retry, tcp;
int mountprog, mountvers, nfsprog, nfsvers;
@@ -320,6 +320,7 @@
noac = 0;
retry = 10000; /* 10000 minutes ~ 1 week */
tcp = 0;
+ nonreserved = 0;
mountprog = MOUNTPROG;
mountvers = 0;
@@ -411,6 +412,8 @@
soft = !val;
else if (!strcmp(opt, "intr"))
intr = val;
+ else if (!strcmp(opt, "reserved"))
+ nonreserved = !val;
else if (!strcmp(opt, "posix"))
posix = val;
else if (!strcmp(opt, "cto"))
@@ -445,7 +448,8 @@
| (intr ? NFS_MOUNT_INTR : 0)
| (posix ? NFS_MOUNT_POSIX : 0)
| (nocto ? NFS_MOUNT_NOCTO : 0)
- | (noac ? NFS_MOUNT_NOAC : 0);
+ | (noac ? NFS_MOUNT_NOAC : 0)
+ | (nonreserved ? NFS_MOUNT_NONRESERVED : 0);
#if NFS_MOUNT_VERSION >= 2
if (nfs_mount_version >= 2)
data.flags |= (tcp ? NFS_MOUNT_TCP : 0);
diff -u util-linux-2.11z/mount/nfs_mount4.h-o util-linux-2.11z/mount/nfs_mount4.h
--- util-linux-2.11z/mount/nfs_mount4.h-o 2003-06-18 15:23:06.000000000 +0200
+++ util-linux-2.11z/mount/nfs_mount4.h 2003-06-18 15:26:04.000000000 +0200
@@ -52,3 +52,4 @@
#define NFS_MOUNT_NONLM 0x0200 /* 3 */
#define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */
#define NFS_MOUNT_NOACL 0x0800 /* 4 */
+#define NFS_MOUNT_NONRESERVED 0x1000
--- util-linux-2.11z/mount/nfs.5-o 2003-06-18 07:10:54.000000000 -0700
+++ util-linux-2.11z/mount/nfs.5 2003-06-18 07:14:05.000000000 -0700
@@ -213,6 +213,11 @@
NFS version 3. (On NFS version 2 filesystems this option has no effect.)
This option also deactivates the GETACL and SETACL remote procedure calls
which are otherwise used to manipulate ACLs.
+.TP 1.5i
+.I noreserved
+Don't use a reserved source port. This usually requires special options
+on the NFS server (insecure for linux knfsd), but allows more than 1024
+mounts from a single IP address.
.P
All of the non-value options have corresponding nooption forms.
For example, nointr means don't allow file operations to be