diff options
author | renelson <[email protected]> | 2013-12-17 10:44:23 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-12-18 16:46:20 -0800 |
commit | a5f3665168946318c98ed5407b9314d400bd6dde (patch) | |
tree | 713134588665baa12f22877c3d9fcc10edabde31 /lib | |
parent | 758d35520b7e15fd6db2e8c8f45294a9cf0514cb (diff) |
Handle acl flags from util-linux mount command
Add acl, noacl and posixacl to option_map, avoiding ENOENT error
case when mount from util-linux-2.24 execs mount.zfs with any of
those flags
Signed-off-by: Brian Behlendorf <[email protected]>
Signed-off-by: renelson <[email protected]>
Issue #1968
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libspl/include/sys/mntent.h | 9 | ||||
-rw-r--r-- | lib/libspl/include/sys/mount.h | 9 |
2 files changed, 15 insertions, 3 deletions
diff --git a/lib/libspl/include/sys/mntent.h b/lib/libspl/include/sys/mntent.h index 736c3f866..a4be01d75 100644 --- a/lib/libspl/include/sys/mntent.h +++ b/lib/libspl/include/sys/mntent.h @@ -93,9 +93,12 @@ #define MNTOPT_NOXATTR "noxattr" /* disable extended attributes */ #define MNTOPT_COMMENT "comment" /* comment */ #define MNTOPT_ZFSUTIL "zfsutil" /* called by zfs utility */ +#define MNTOPT_ACL "acl" /* passed by util-linux-2.24 mount */ +#define MNTOPT_NOACL "noacl" /* likewise */ +#define MNTOPT_POSIXACL "posixacl" /* likewise */ -#define ZS_COMMENT 0x00000000 /* comment */ -#define ZS_ZFSUTIL 0x00000001 /* caller is zfs(8) */ -#define ZS_NOCONTEXT 0x00000002 /* do not add selinux context */ +#define ZS_COMMENT 0x00000000 /* comment */ +#define ZS_ZFSUTIL 0x00000001 /* caller is zfs(8) */ +#define ZS_NOCONTEXT 0x00000002 /* do not add selinux context */ #endif /* _SYS_MNTENT_H */ diff --git a/lib/libspl/include/sys/mount.h b/lib/libspl/include/sys/mount.h index 7b1e06bdb..0fa4f2554 100644 --- a/lib/libspl/include/sys/mount.h +++ b/lib/libspl/include/sys/mount.h @@ -51,6 +51,15 @@ #define MS_DIRSYNC S_WRITE #endif +/* + * Some old glibc headers don't correctly define MS_POSIXACL and + * instead leave it undefined. When using these older headers define + * MS_POSIXACL to the reserved value of (1<<16). + */ +#if !defined(MS_POSIXACL) +#define MS_POSIXACL (1<<16) +#endif + #define MS_USERS (MS_NOEXEC|MS_NOSUID|MS_NODEV) #define MS_OWNER (MS_NOSUID|MS_NODEV) #define MS_GROUP (MS_NOSUID|MS_NODEV) |