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