2006-12-19 00:18:10 +01:00
|
|
|
Adds the [no]acl NFS mount option that was added to the kernel. This
|
|
|
|
change has been discussed and accepted by Trond Myklebust
|
|
|
|
<trond.myklebust@fys.uio.no> and Olaf Kirch <okir@suse.de>.
|
|
|
|
|
|
|
|
-- Andreas Gruenbacher <agruen@suse.de>
|
|
|
|
|
|
|
|
================================================================================
|
2007-04-12 18:31:42 +02:00
|
|
|
Index: util-linux-ng-2.12r+2.13pre7/mount/mount.8
|
|
|
|
===================================================================
|
|
|
|
--- util-linux-ng-2.12r+2.13pre7.orig/mount/mount.8
|
|
|
|
+++ util-linux-ng-2.12r+2.13pre7/mount/mount.8
|
|
|
|
@@ -1335,7 +1335,8 @@ are recognized:
|
2006-12-19 00:18:10 +01:00
|
|
|
.BR ac ,
|
|
|
|
.BR tcp ,
|
|
|
|
.BR udp ,
|
|
|
|
-.BR lock .
|
|
|
|
+.BR lock ,
|
|
|
|
+.BR acl .
|
|
|
|
For details, see
|
|
|
|
.BR nfs (5).
|
|
|
|
|
2007-04-12 18:31:42 +02:00
|
|
|
Index: util-linux-ng-2.12r+2.13pre7/mount/nfs.5
|
|
|
|
===================================================================
|
|
|
|
--- util-linux-ng-2.12r+2.13pre7.orig/mount/nfs.5
|
|
|
|
+++ util-linux-ng-2.12r+2.13pre7/mount/nfs.5
|
|
|
|
@@ -204,6 +204,15 @@ default UDP protocol. Many NFS servers
|
2006-12-19 00:18:10 +01:00
|
|
|
.I udp
|
|
|
|
Mount the NFS filesystem using the UDP protocol. This
|
|
|
|
is the default.
|
|
|
|
+.TP 1.5i
|
|
|
|
+.I noacl
|
|
|
|
+Assume no extended access control mechanisms like POSIX ACLs are used
|
|
|
|
+on the NFS filesystem, and depend on the file mode permission bits
|
|
|
|
+instead of using the ACCESS remote procedure call. The default is to
|
|
|
|
+use the ACCESS remote procedure call for making access decisions in
|
|
|
|
+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.
|
|
|
|
.P
|
|
|
|
All of the non-value options have corresponding nooption forms.
|
|
|
|
For example, nointr means don't allow file operations to be
|
2007-04-12 18:31:42 +02:00
|
|
|
Index: util-linux-ng-2.12r+2.13pre7/mount/nfs_mount4.h
|
|
|
|
===================================================================
|
|
|
|
--- util-linux-ng-2.12r+2.13pre7.orig/mount/nfs_mount4.h
|
|
|
|
+++ util-linux-ng-2.12r+2.13pre7/mount/nfs_mount4.h
|
|
|
|
@@ -51,4 +51,4 @@ struct nfs_mount_data {
|
2006-12-19 00:18:10 +01:00
|
|
|
#define NFS_MOUNT_KERBEROS 0x0100 /* 3 */
|
|
|
|
#define NFS_MOUNT_NONLM 0x0200 /* 3 */
|
|
|
|
#define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */
|
|
|
|
-
|
|
|
|
+#define NFS_MOUNT_NOACL 0x0800 /* 4 */
|
2007-04-12 18:31:42 +02:00
|
|
|
Index: util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c
|
|
|
|
===================================================================
|
|
|
|
--- util-linux-ng-2.12r+2.13pre7.orig/mount/nfsmount.c
|
|
|
|
+++ util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c
|
|
|
|
@@ -214,7 +214,7 @@ int nfsmount(const char *spec, const cha
|
2006-12-19 00:18:10 +01:00
|
|
|
struct stat statbuf;
|
|
|
|
char *s;
|
|
|
|
int port, mountport, proto, bg, soft, intr;
|
|
|
|
- int posix, nocto, noac, nolock, broken_suid;
|
|
|
|
+ int posix, nocto, noac, nolock, broken_suid, noacl;
|
|
|
|
int retry, tcp;
|
|
|
|
int mountprog, mountvers, nfsprog, nfsvers;
|
|
|
|
int retval;
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -314,6 +314,7 @@ int nfsmount(const char *spec, const cha
|
2006-12-19 00:18:10 +01:00
|
|
|
nocto = 0;
|
|
|
|
nolock = 0;
|
|
|
|
broken_suid = 0;
|
|
|
|
+ noacl = 0;
|
|
|
|
noac = 0;
|
|
|
|
retry = 10000; /* 10000 minutes ~ 1 week */
|
|
|
|
tcp = 0;
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -425,6 +426,8 @@ int nfsmount(const char *spec, const cha
|
2006-12-19 00:18:10 +01:00
|
|
|
printf(_("Warning: option nolock is not supported.\n"));
|
|
|
|
} else if (!strcmp(opt, "broken_suid")) {
|
|
|
|
broken_suid = val;
|
|
|
|
+ } else if (!strcmp(opt, "acl")) {
|
|
|
|
+ noacl = !val;
|
|
|
|
} else {
|
|
|
|
if (!sloppy) {
|
|
|
|
printf(_("unknown nfs mount option: "
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -450,8 +453,10 @@ int nfsmount(const char *spec, const cha
|
2006-12-19 00:18:10 +01:00
|
|
|
data.flags |= (nolock ? NFS_MOUNT_NONLM : 0);
|
|
|
|
#endif
|
|
|
|
#if NFS_MOUNT_VERSION >= 4
|
|
|
|
- if (nfs_mount_version >= 4)
|
|
|
|
+ if (nfs_mount_version >= 4) {
|
|
|
|
data.flags |= (broken_suid ? NFS_MOUNT_BROKEN_SUID : 0);
|
|
|
|
+ data.flags |= (noacl ? NFS_MOUNT_NOACL : 0);
|
|
|
|
+ }
|
|
|
|
#endif
|
|
|
|
if (nfsvers > MAX_NFSPROT) {
|
|
|
|
fprintf(stderr, "NFSv%d not supported!\n", nfsvers);
|