diff options
| author | Stefan Berger <[email protected]> | 2024-02-23 17:25:05 +0000 |
|---|---|---|
| committer | Mimi Zohar <[email protected]> | 2024-04-09 21:14:57 +0000 |
| commit | 3253804773c0613a1bad5bfea2edf172b760d8b6 (patch) | |
| tree | d3f6b1b665725dbf66221496577d3030b9a9692f /security/selinux/hooks.c | |
| parent | ima: Rename backing_inode to real_inode (diff) | |
| download | kernel-3253804773c0613a1bad5bfea2edf172b760d8b6.tar.gz kernel-3253804773c0613a1bad5bfea2edf172b760d8b6.zip | |
security: allow finer granularity in permitting copy-up of security xattrs
Copying up xattrs is solely based on the security xattr name. For finer
granularity add a dentry parameter to the security_inode_copy_up_xattr
hook definition, allowing decisions to be based on the xattr content as
well.
Co-developed-by: Mimi Zohar <[email protected]>
Signed-off-by: Stefan Berger <[email protected]>
Acked-by: Amir Goldstein <[email protected]>
Acked-by: Paul Moore <[email protected]> (LSM,SELinux)
Signed-off-by: Mimi Zohar <[email protected]>
Diffstat (limited to 'security/selinux/hooks.c')
| -rw-r--r-- | security/selinux/hooks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 3448454c82d0..9f018f51e47a 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -3530,7 +3530,7 @@ static int selinux_inode_copy_up(struct dentry *src, struct cred **new) return 0; } -static int selinux_inode_copy_up_xattr(const char *name) +static int selinux_inode_copy_up_xattr(struct dentry *dentry, const char *name) { /* The copy_up hook above sets the initial context on an inode, but we * don't then want to overwrite it by blindly copying all the lower |
