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>
This commit is contained in:

committed by
Kees Cook

parent
b17103a8b8
commit
0c6cfa622c
@@ -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_ */
|
||||
|
Reference in New Issue
Block a user