diff options
author | Christian Brauner <brauner@kernel.org> | 2022-07-20 14:32:52 +0200 |
---|---|---|
committer | Christian Brauner (Microsoft) <brauner@kernel.org> | 2022-08-22 12:52:23 +0200 |
commit | 0c3bc7899e6dfb52df1c46118a5a670ae619645f (patch) | |
tree | 451e70daa47b17a87fdb552f2f3cd83350fdd8ef /fs/exfat/file.c | |
parent | bf1ac16edf6770a92bc75cf2373f1f9feea398a4 (diff) | |
download | linux-stable-0c3bc7899e6dfb52df1c46118a5a670ae619645f.tar.gz linux-stable-0c3bc7899e6dfb52df1c46118a5a670ae619645f.tar.bz2 linux-stable-0c3bc7899e6dfb52df1c46118a5a670ae619645f.zip |
ntfs: fix acl handling
While looking at our current POSIX ACL handling in the context of some
overlayfs work I went through a range of other filesystems checking how they
handle them currently and encountered ntfs3.
The posic_acl_{from,to}_xattr() helpers always need to operate on the
filesystem idmapping. Since ntfs3 can only be mounted in the initial user
namespace the relevant idmapping is init_user_ns.
The posix_acl_{from,to}_xattr() helpers are concerned with translating between
the kernel internal struct posix_acl{_entry} and the uapi struct
posix_acl_xattr_{header,entry} and the kernel internal data structure is cached
filesystem wide.
Additional idmappings such as the caller's idmapping or the mount's idmapping
are handled higher up in the VFS. Individual filesystems usually do not need to
concern themselves with these.
The posix_acl_valid() helper is concerned with checking whether the values in
the kernel internal struct posix_acl can be represented in the filesystem's
idmapping. IOW, if they can be written to disk. So this helper too needs to
take the filesystem's idmapping.
Fixes: be71b5cba2e6 ("fs/ntfs3: Add attrib operations")
Cc: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: ntfs3@lists.linux.dev
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Diffstat (limited to 'fs/exfat/file.c')
0 files changed, 0 insertions, 0 deletions