LSM: Infrastructure management of the file security
Move management of the file->f_security blob out of the individual security modules and into the infrastructure. The modules no longer allocate or free the data, instead they tell the infrastructure how much space they require. 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
f28952ac90
commit
33bf60cabc
@@ -364,7 +364,8 @@ static inline struct task_smack *smack_cred(const struct cred *cred)
|
||||
|
||||
static inline struct smack_known **smack_file(const struct file *file)
|
||||
{
|
||||
return (struct smack_known **)&file->f_security;
|
||||
return (struct smack_known **)(file->f_security +
|
||||
smack_blob_sizes.lbs_file);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user