aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/mount_zfs/mount_zfs.c4
-rw-r--r--lib/libspl/include/sys/mntent.h9
-rw-r--r--lib/libspl/include/sys/mount.h9
3 files changed, 19 insertions, 3 deletions
diff --git a/cmd/mount_zfs/mount_zfs.c b/cmd/mount_zfs/mount_zfs.c
index b3c3e9a14..f7e2d99a0 100644
--- a/cmd/mount_zfs/mount_zfs.c
+++ b/cmd/mount_zfs/mount_zfs.c
@@ -61,6 +61,10 @@ static const option_map_t option_map[] = {
{ MNTOPT_SYNC, MS_SYNCHRONOUS, ZS_COMMENT },
{ MNTOPT_USER, MS_USERS, ZS_COMMENT },
{ MNTOPT_USERS, MS_USERS, ZS_COMMENT },
+ /* acl flags passed with util-linux-2.24 mount command */
+ { MNTOPT_ACL, MS_POSIXACL, ZS_COMMENT },
+ { MNTOPT_NOACL, MS_COMMENT, ZS_COMMENT },
+ { MNTOPT_POSIXACL, MS_POSIXACL, ZS_COMMENT },
#ifdef MS_NOATIME
{ MNTOPT_NOATIME, MS_NOATIME, ZS_COMMENT },
#endif
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)