diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-01-30 19:57:52 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2022-09-01 17:34:39 -0400 |
commit | c8e477c649b40c1a073b7a843d89e51dc0037db7 (patch) | |
tree | 916d9b3240e1ac3524d99decf83aa9030f1bb37b /security/apparmor/lsm.c | |
parent | 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff) | |
download | linux-c8e477c649b40c1a073b7a843d89e51dc0037db7.tar.gz linux-c8e477c649b40c1a073b7a843d89e51dc0037db7.tar.bz2 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/apparmor/lsm.c')
-rw-r--r-- | security/apparmor/lsm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index e29cade7b662..f56070270c69 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -614,7 +614,7 @@ static int apparmor_sb_pivotroot(const struct path *old_path, return error; } -static int apparmor_getprocattr(struct task_struct *task, char *name, +static int apparmor_getprocattr(struct task_struct *task, const char *name, char **value) { int error = -ENOENT; |