diff options
author | Christian Brauner <brauner@kernel.org> | 2022-09-22 17:17:04 +0200 |
---|---|---|
committer | Christian Brauner (Microsoft) <brauner@kernel.org> | 2022-10-20 10:13:28 +0200 |
commit | 6cd4d4e8b6e1495eb0cafa3a59d1fde137a98d22 (patch) | |
tree | 5f2152783821fe644d491e754b43f117150c4121 /block | |
parent | dc1af4c4b4721abfa07b351063825acc7e69cc66 (diff) | |
download | linux-stable-6cd4d4e8b6e1495eb0cafa3a59d1fde137a98d22.tar.gz linux-stable-6cd4d4e8b6e1495eb0cafa3a59d1fde137a98d22.tar.bz2 linux-stable-6cd4d4e8b6e1495eb0cafa3a59d1fde137a98d22.zip |
9p: implement get acl method
The current way of setting and getting posix acls through the generic
xattr interface is error prone and type unsafe. The vfs needs to
interpret and fixup posix acls before storing or reporting it to
userspace. Various hacks exist to make this work. The code is hard to
understand and difficult to maintain in it's current form. Instead of
making this work by hacking posix acls through xattr handlers we are
building a dedicated posix acl api around the get and set inode
operations. This removes a lot of hackiness and makes the codepaths
easier to maintain. A lot of background can be found in [1].
In order to build a type safe posix api around get and set acl we need
all filesystem to implement get and set acl.
So far 9p implemented a ->get_inode_acl() operation that didn't require
access to the dentry in order to allow (limited) permission checking via
posix acls in the vfs. Now that we have get and set acl inode operations
that take a dentry argument we can give 9p get and set acl inode
operations.
This is mostly a refactoring of the codepaths currently used in 9p posix
acl xattr handler. After we have fully implemented the posix acl api and
switched the vfs over to it, the 9p specific posix acl xattr handler and
associated code will be removed.
Note, until the vfs has been switched to the new posix acl api this
patch is a non-functional change.
Link: https://lore.kernel.org/all/20220801145520.1532837-1-brauner@kernel.org [1]
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions