summaryrefslogtreecommitdiffstats
path: root/security/security.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2022-01-31 01:57:52 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2022-09-01 23:34:39 +0200
commitc8e477c649b40c1a073b7a843d89e51dc0037db7 (patch)
tree916d9b3240e1ac3524d99decf83aa9030f1bb37b /security/security.c
parentLinux 6.0-rc1 (diff)
downloadlinux-c8e477c649b40c1a073b7a843d89e51dc0037db7.tar.xz
linux-c8e477c649b40c1a073b7a843d89e51dc0037db7.zip
->getprocattr(): attribute name is const char *, TYVM...
cast of ->d_name.name to char * is completely wrong - nothing is allowed to modify its contents. Reviewed-by: Christian Brauner (Microsoft) <brauner@kernel.org> Acked-by: Paul Moore <paul@paul-moore.com> Acked-by: Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security/security.c')
-rw-r--r--security/security.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/security.c b/security/security.c
index 14d30fec8a00..d8227531e2fd 100644
--- a/security/security.c
+++ b/security/security.c
@@ -2057,8 +2057,8 @@ void security_d_instantiate(struct dentry *dentry, struct inode *inode)
}
EXPORT_SYMBOL(security_d_instantiate);
-int security_getprocattr(struct task_struct *p, const char *lsm, char *name,
- char **value)
+int security_getprocattr(struct task_struct *p, const char *lsm,
+ const char *name, char **value)
{
struct security_hook_list *hp;