mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 11:19:32 +03:00
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 <behlendorf1@llnl.gov> Signed-off-by: renelson <bnelson@nelsonbe.com> Issue #1968
This commit is contained in:
parent
758d35520b
commit
a5f3665168
@ -61,6 +61,10 @@ static const option_map_t option_map[] = {
|
|||||||
{ MNTOPT_SYNC, MS_SYNCHRONOUS, ZS_COMMENT },
|
{ MNTOPT_SYNC, MS_SYNCHRONOUS, ZS_COMMENT },
|
||||||
{ MNTOPT_USER, MS_USERS, ZS_COMMENT },
|
{ MNTOPT_USER, MS_USERS, ZS_COMMENT },
|
||||||
{ MNTOPT_USERS, 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
|
#ifdef MS_NOATIME
|
||||||
{ MNTOPT_NOATIME, MS_NOATIME, ZS_COMMENT },
|
{ MNTOPT_NOATIME, MS_NOATIME, ZS_COMMENT },
|
||||||
#endif
|
#endif
|
||||||
|
@ -93,9 +93,12 @@
|
|||||||
#define MNTOPT_NOXATTR "noxattr" /* disable extended attributes */
|
#define MNTOPT_NOXATTR "noxattr" /* disable extended attributes */
|
||||||
#define MNTOPT_COMMENT "comment" /* comment */
|
#define MNTOPT_COMMENT "comment" /* comment */
|
||||||
#define MNTOPT_ZFSUTIL "zfsutil" /* called by zfs utility */
|
#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_COMMENT 0x00000000 /* comment */
|
||||||
#define ZS_ZFSUTIL 0x00000001 /* caller is zfs(8) */
|
#define ZS_ZFSUTIL 0x00000001 /* caller is zfs(8) */
|
||||||
#define ZS_NOCONTEXT 0x00000002 /* do not add selinux context */
|
#define ZS_NOCONTEXT 0x00000002 /* do not add selinux context */
|
||||||
|
|
||||||
#endif /* _SYS_MNTENT_H */
|
#endif /* _SYS_MNTENT_H */
|
||||||
|
@ -51,6 +51,15 @@
|
|||||||
#define MS_DIRSYNC S_WRITE
|
#define MS_DIRSYNC S_WRITE
|
||||||
#endif
|
#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_USERS (MS_NOEXEC|MS_NOSUID|MS_NODEV)
|
||||||
#define MS_OWNER (MS_NOSUID|MS_NODEV)
|
#define MS_OWNER (MS_NOSUID|MS_NODEV)
|
||||||
#define MS_GROUP (MS_NOSUID|MS_NODEV)
|
#define MS_GROUP (MS_NOSUID|MS_NODEV)
|
||||||
|
Loading…
Reference in New Issue
Block a user