summaryrefslogtreecommitdiffstats
path: root/security/apparmor/domain.c
diff options
context:
space:
mode:
authorCasey Schaufler2018-09-22 02:17:59 +0200
committerKees Cook2019-01-08 22:18:44 +0100
commit69b5a44a95bb86f3ad8a50bf2e354057ec450082 (patch)
tree64a3c7a0e942b15a16d387f474409ebb48761558 /security/apparmor/domain.c
parentSELinux: Remove unused selinux_is_enabled (diff)
downloadkernel-qcow2-linux-69b5a44a95bb86f3ad8a50bf2e354057ec450082.tar.gz
kernel-qcow2-linux-69b5a44a95bb86f3ad8a50bf2e354057ec450082.tar.xz
kernel-qcow2-linux-69b5a44a95bb86f3ad8a50bf2e354057ec450082.zip
AppArmor: Abstract use of cred security blob
Don't use the cred->security pointer directly. Provide a helper function that provides the security blob pointer. Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> Reviewed-by: Kees Cook <keescook@chromium.org> [kees: adjusted for ordered init series] Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'security/apparmor/domain.c')
-rw-r--r--security/apparmor/domain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index 08c88de0ffda..726910bba84b 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -975,7 +975,7 @@ int apparmor_bprm_set_creds(struct linux_binprm *bprm)
}
aa_put_label(cred_label(bprm->cred));
/* transfer reference, released when cred is freed */
- cred_label(bprm->cred) = new;
+ set_cred_label(bprm->cred, new);
done:
aa_put_label(label);