mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-24 07:40:52 +00:00
config: remove HAVE_POSIX_ACL_VALID_WITH_NS
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #16479
This commit is contained in:
parent
a1832d1ecb
commit
7cc89f83ff
@ -21,34 +21,6 @@ AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 4.8 API change,
|
||||
dnl # The function posix_acl_valid now must be passed a namespace.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_POSIX_ACL_VALID_WITH_NS], [
|
||||
ZFS_LINUX_TEST_SRC([posix_acl_valid_with_ns], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/posix_acl.h>
|
||||
],[
|
||||
struct user_namespace *user_ns = NULL;
|
||||
const struct posix_acl *acl = NULL;
|
||||
int error;
|
||||
|
||||
error = posix_acl_valid(user_ns, acl);
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS], [
|
||||
AC_MSG_CHECKING([whether posix_acl_valid() wants user namespace])
|
||||
ZFS_LINUX_TEST_RESULT([posix_acl_valid_with_ns], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_POSIX_ACL_VALID_WITH_NS, 1,
|
||||
[posix_acl_valid() wants user namespace])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 3.1 API change,
|
||||
dnl # Check if inode_operations contains the function get_acl
|
||||
@ -226,7 +198,6 @@ AC_DEFUN([ZFS_AC_KERNEL_ACL_HAS_REFCOUNT], [
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_ACL], [
|
||||
ZFS_AC_KERNEL_SRC_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T
|
||||
ZFS_AC_KERNEL_SRC_POSIX_ACL_VALID_WITH_NS
|
||||
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL
|
||||
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL
|
||||
ZFS_AC_KERNEL_SRC_ACL_HAS_REFCOUNT
|
||||
@ -234,7 +205,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_ACL], [
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_ACL], [
|
||||
ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T
|
||||
ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS
|
||||
ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL
|
||||
ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL
|
||||
ZFS_AC_KERNEL_ACL_HAS_REFCOUNT
|
||||
|
@ -161,18 +161,6 @@ zpl_posix_acl_release(struct posix_acl *acl)
|
||||
zpl_posix_acl_release_impl(acl);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* 4.8 API change,
|
||||
* posix_acl_valid() now must be passed a namespace, the namespace from
|
||||
* from super block associated with the given inode is used for this purpose.
|
||||
*/
|
||||
#ifdef HAVE_POSIX_ACL_VALID_WITH_NS
|
||||
#define zpl_posix_acl_valid(ip, acl) posix_acl_valid(ip->i_sb->s_user_ns, acl)
|
||||
#else
|
||||
#define zpl_posix_acl_valid(ip, acl) posix_acl_valid(acl)
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_FS_POSIX_ACL */
|
||||
|
||||
static inline uid_t zfs_uid_read_impl(struct inode *ip)
|
||||
|
@ -1329,7 +1329,7 @@ __zpl_xattr_acl_set_access(zidmap_t *mnt_ns,
|
||||
if (IS_ERR(acl))
|
||||
return (PTR_ERR(acl));
|
||||
else if (acl) {
|
||||
error = zpl_posix_acl_valid(ip, acl);
|
||||
error = posix_acl_valid(ip->i_sb->s_user_ns, acl);
|
||||
if (error) {
|
||||
zpl_posix_acl_release(acl);
|
||||
return (error);
|
||||
@ -1375,7 +1375,7 @@ __zpl_xattr_acl_set_default(zidmap_t *mnt_ns,
|
||||
if (IS_ERR(acl))
|
||||
return (PTR_ERR(acl));
|
||||
else if (acl) {
|
||||
error = zpl_posix_acl_valid(ip, acl);
|
||||
error = posix_acl_valid(ip->i_sb->s_user_ns, acl);
|
||||
if (error) {
|
||||
zpl_posix_acl_release(acl);
|
||||
return (error);
|
||||
|
Loading…
Reference in New Issue
Block a user