SELinux: Abstract use of file security blob
Don't use the file->f_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> Signed-off-by: Kees Cook <keescook@chromium.org>
This commit is contained in:

committed by
Kees Cook

parent
bbd3662a83
commit
bb6c6b02cc
@@ -165,4 +165,9 @@ static inline struct task_security_struct *selinux_cred(const struct cred *cred)
|
||||
return cred->security + selinux_blob_sizes.lbs_cred;
|
||||
}
|
||||
|
||||
static inline struct file_security_struct *selinux_file(const struct file *file)
|
||||
{
|
||||
return file->f_security;
|
||||
}
|
||||
|
||||
#endif /* _SELINUX_OBJSEC_H_ */
|
||||
|
Reference in New Issue
Block a user