|
Kmods SIG |
8b815c |
From ba77237ef880320105e681b93d596b2fb13860f9 Mon Sep 17 00:00:00 2001
|
|
Kmods SIG |
8b815c |
From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
|
|
Kmods SIG |
8b815c |
Date: Wed, 22 Sep 2021 18:46:14 +0300
|
|
Kmods SIG |
8b815c |
Subject: [Backport ba77237ef880] src: Change posix_acl_equiv_mode to
|
|
Kmods SIG |
8b815c |
posix_acl_update_mode
|
|
Kmods SIG |
8b815c |
|
|
Kmods SIG |
8b815c |
Right now ntfs3 uses posix_acl_equiv_mode instead of
|
|
Kmods SIG |
8b815c |
posix_acl_update_mode like all other fs.
|
|
Kmods SIG |
8b815c |
|
|
Kmods SIG |
8b815c |
Reviewed-by: Kari Argillander <kari.argillander@gmail.com>
|
|
Kmods SIG |
8b815c |
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
|
|
Kmods SIG |
8b815c |
---
|
|
Kmods SIG |
8b815c |
src/xattr.c | 15 ++++-----------
|
|
Kmods SIG |
8b815c |
1 file changed, 4 insertions(+), 11 deletions(-)
|
|
Kmods SIG |
8b815c |
|
|
Kmods SIG |
8b815c |
diff --git a/src/xattr.c b/src/xattr.c
|
|
Kmods SIG |
8b815c |
index 70f2f9eb6b1eb3e7bebc3703762abfb7e42d7be1..59ec5e61a2390511a633c39b4e8ae3b01a2b9840 100644
|
|
Kmods SIG |
8b815c |
--- a/src/xattr.c
|
|
Kmods SIG |
8b815c |
+++ b/src/xattr.c
|
|
Kmods SIG |
8b815c |
@@ -559,22 +559,15 @@ static noinline int ntfs_set_acl_ex(struct user_namespace *mnt_userns,
|
|
Kmods SIG |
8b815c |
if (acl) {
|
|
Kmods SIG |
8b815c |
umode_t mode = inode->i_mode;
|
|
Kmods SIG |
8b815c |
|
|
Kmods SIG |
8b815c |
- err = posix_acl_equiv_mode(acl, &mode);
|
|
Kmods SIG |
8b815c |
- if (err < 0)
|
|
Kmods SIG |
8b815c |
- return err;
|
|
Kmods SIG |
8b815c |
+ err = posix_acl_update_mode(mnt_userns, inode, &mode,
|
|
Kmods SIG |
8b815c |
+ &acl;;
|
|
Kmods SIG |
8b815c |
+ if (err)
|
|
Kmods SIG |
8b815c |
+ goto out;
|
|
Kmods SIG |
8b815c |
|
|
Kmods SIG |
8b815c |
if (inode->i_mode != mode) {
|
|
Kmods SIG |
8b815c |
inode->i_mode = mode;
|
|
Kmods SIG |
8b815c |
mark_inode_dirty(inode);
|
|
Kmods SIG |
8b815c |
}
|
|
Kmods SIG |
8b815c |
-
|
|
Kmods SIG |
8b815c |
- if (!err) {
|
|
Kmods SIG |
8b815c |
- /*
|
|
Kmods SIG |
8b815c |
- * ACL can be exactly represented in the
|
|
Kmods SIG |
8b815c |
- * traditional file mode permission bits.
|
|
Kmods SIG |
8b815c |
- */
|
|
Kmods SIG |
8b815c |
- acl = NULL;
|
|
Kmods SIG |
8b815c |
- }
|
|
Kmods SIG |
8b815c |
}
|
|
Kmods SIG |
8b815c |
name = XATTR_NAME_POSIX_ACL_ACCESS;
|
|
Kmods SIG |
8b815c |
name_len = sizeof(XATTR_NAME_POSIX_ACL_ACCESS) - 1;
|
|
Kmods SIG |
8b815c |
--
|
|
Kmods SIG |
8b815c |
2.31.1
|
|
Kmods SIG |
8b815c |
|