[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [PATCH] noacl nfs mount option
From: Dave Love <d.love () liverpool ! ac ! uk>
Date: 2011-11-10 12:00:31
Message-ID: 87pqh0dw68.fsf () liv ! ac ! uk
[Download RAW message or body]
I need to deal with a Solaris-exported NFS root in a busyboxed initramfs
(using the onesis.org system). With such a filesystem, operations like
"cp -a" return an error unless it's mounted "-o noacl" with NFS3 (though
the file is actually copied OK), but Busybox's mount doesn't support
noacl.
Here's a patch to add it, following util-linux.
["noacl.diff" (text/x-patch)]
diff --git a/util-linux/mount.c b/util-linux/mount.c
index f94b6e6..9df8e72 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -859,6 +859,7 @@ enum {
NFS_MOUNT_VER3 = 0x0080, /* 3 */
NFS_MOUNT_KERBEROS = 0x0100, /* 3 */
NFS_MOUNT_NONLM = 0x0200, /* 3 */
+ NFS_MOUNT_NOACL = 0x0800, /* 4 */
NFS_MOUNT_NORDIRPLUS = 0x4000
};
@@ -1123,6 +1124,7 @@ static NOINLINE int nfsmount(struct mntent *mp, long vfsflags, char *filteropts)
int noac;
int nordirplus;
int nolock;
+ int noacl;
find_kernel_nfs_mount_version();
@@ -1195,6 +1197,7 @@ static NOINLINE int nfsmount(struct mntent *mp, long vfsflags, char *filteropts)
nolock = 0;
noac = 0;
nordirplus = 0;
+ noacl = 0;
retry = 10000; /* 10000 minutes ~ 1 week */
tcp = 1; /* nfs-utils uses tcp per default */
@@ -1333,7 +1336,8 @@ static NOINLINE int nfsmount(struct mntent *mp, long vfsflags, char *filteropts)
"tcp\0"
"udp\0"
"lock\0"
- "rdirplus\0";
+ "rdirplus\0"
+ "acl\0";
int val = 1;
if (!strncmp(opt, "no", 2)) {
val = 0;
@@ -1383,6 +1387,9 @@ static NOINLINE int nfsmount(struct mntent *mp, long vfsflags, char *filteropts)
case 11: //rdirplus
nordirplus = !val;
break;
+ case 12: // acl
+ noacl = !val;
+ break;
default:
bb_error_msg("unknown nfs mount option: %s%s", val ? "" : "no", opt);
goto fail;
@@ -1396,7 +1403,8 @@ static NOINLINE int nfsmount(struct mntent *mp, long vfsflags, char *filteropts)
| (posix ? NFS_MOUNT_POSIX : 0)
| (nocto ? NFS_MOUNT_NOCTO : 0)
| (noac ? NFS_MOUNT_NOAC : 0)
- | (nordirplus ? NFS_MOUNT_NORDIRPLUS : 0);
+ | (nordirplus ? NFS_MOUNT_NORDIRPLUS : 0)
+ | (noacl ? NFS_MOUNT_NOACL : 0);
if (nfs_mount_version >= 2)
data.flags |= (tcp ? NFS_MOUNT_TCP : 0);
if (nfs_mount_version >= 3)
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic