mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Honor CONFIG_FS_POSIX_ACL kernel option
The required Posix ACL interfaces are only available for kernels with CONFIG_FS_POSIX_ACL defined. Therefore, only enable Posix ACL support for these kernels. All major distribution kernels enable CONFIG_FS_POSIX_ACL by default. If your kernel does not support Posix ACLs the following warning will be printed at ZFS module load time. "ZFS: Posix ACLs disabled by kernel" Signed-off-by: Massimo Maggi <me@massimo-maggi.eu> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1825
This commit is contained in:
committed by
Brian Behlendorf
parent
78e2739d3c
commit
b695c34ea4
@@ -174,6 +174,7 @@ lseek_execute(struct file *filp, struct inode *inode,
|
||||
}
|
||||
#endif /* SEEK_HOLE && SEEK_DATA && !HAVE_LSEEK_EXECUTE */
|
||||
|
||||
#if defined(CONFIG_FS_POSIX_ACL)
|
||||
/*
|
||||
* These functions safely approximates the behavior of posix_acl_release()
|
||||
* which cannot be used because it calls the GPL-only symbol kfree_rcu().
|
||||
@@ -315,5 +316,6 @@ typedef umode_t zpl_equivmode_t;
|
||||
#else
|
||||
typedef mode_t zpl_equivmode_t;
|
||||
#endif /* HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T */
|
||||
#endif /* CONFIG_FS_POSIX_ACL */
|
||||
|
||||
#endif /* _ZFS_VFS_H */
|
||||
|
||||
@@ -71,6 +71,7 @@ extern struct file_system_type zpl_fs_type;
|
||||
extern ssize_t zpl_xattr_list(struct dentry *dentry, char *buf, size_t size);
|
||||
extern int zpl_xattr_security_init(struct inode *ip, struct inode *dip,
|
||||
const struct qstr *qstr);
|
||||
#if defined(CONFIG_FS_POSIX_ACL)
|
||||
extern int zpl_set_acl(struct inode *ip, int type, struct posix_acl *acl);
|
||||
extern struct posix_acl *zpl_get_acl(struct inode *ip, int type);
|
||||
#if !defined(HAVE_GET_ACL)
|
||||
@@ -87,6 +88,19 @@ extern int zpl_permission(struct inode *ip, int mask);
|
||||
|
||||
extern int zpl_init_acl(struct inode *ip, struct inode *dir);
|
||||
extern int zpl_chmod_acl(struct inode *ip);
|
||||
#else
|
||||
static inline int
|
||||
zpl_init_acl(struct inode *ip, struct inode *dir)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
static inline int
|
||||
zpl_chmod_acl(struct inode *ip)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
#endif /* CONFIG_FS_POSIX_ACL */
|
||||
|
||||
extern xattr_handler_t *zpl_xattr_handlers[];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user