summaryrefslogtreecommitdiffstats
path: root/security/smack
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.ibm.com>2024-02-23 18:25:05 +0100
committerMimi Zohar <zohar@linux.ibm.com>2024-04-09 23:14:57 +0200
commit3253804773c0613a1bad5bfea2edf172b760d8b6 (patch)
treed3f6b1b665725dbf66221496577d3030b9a9692f /security/smack
parentima: Rename backing_inode to real_inode (diff)
downloadlinux-3253804773c0613a1bad5bfea2edf172b760d8b6.tar.xz
linux-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 <zohar@linux.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Acked-by: Amir Goldstein <amir73il@gmail.com> Acked-by: Paul Moore <paul@paul-moore.com> (LSM,SELinux) Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'security/smack')
-rw-r--r--security/smack/smack_lsm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 146667937811..79d8dc633b9a 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -4885,7 +4885,7 @@ static int smack_inode_copy_up(struct dentry *dentry, struct cred **new)
return 0;
}
-static int smack_inode_copy_up_xattr(const char *name)
+static int smack_inode_copy_up_xattr(struct dentry *src, const char *name)
{
/*
* Return 1 if this is the smack access Smack attribute.