diff options
author | Casey Schaufler <casey@schaufler-ca.com> | 2018-09-22 02:17:16 +0200 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2019-01-08 22:18:44 +0100 |
commit | 0c6cfa622cf57109607f3416b286b6b55561a2ea (patch) | |
tree | b19919a635083c0e7dd218e794d78cf536ffb194 /security/selinux/include | |
parent | Smack: Abstract use of cred security blob (diff) | |
download | linux-0c6cfa622cf57109607f3416b286b6b55561a2ea.tar.xz linux-0c6cfa622cf57109607f3416b286b6b55561a2ea.zip |
SELinux: 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/selinux/include')
-rw-r--r-- | security/selinux/include/objsec.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/security/selinux/include/objsec.h b/security/selinux/include/objsec.h index cc5e26b0161b..734b6833bdff 100644 --- a/security/selinux/include/objsec.h +++ b/security/selinux/include/objsec.h @@ -158,4 +158,9 @@ struct bpf_security_struct { u32 sid; /*SID of bpf obj creater*/ }; +static inline struct task_security_struct *selinux_cred(const struct cred *cred) +{ + return cred->security; +} + #endif /* _SELINUX_OBJSEC_H_ */ |