Infrastructure management of the cred security blob
Move management of the cred security blob out of the security modules and into the security infrastructre. Instead of allocating and freeing space the security modules 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
43fc460907
commit
bbd3662a83
@@ -25,7 +25,7 @@
|
||||
|
||||
static inline struct aa_label *cred_label(const struct cred *cred)
|
||||
{
|
||||
struct aa_label **blob = cred->security;
|
||||
struct aa_label **blob = cred->security + apparmor_blob_sizes.lbs_cred;
|
||||
|
||||
AA_BUG(!blob);
|
||||
return *blob;
|
||||
@@ -34,7 +34,7 @@ static inline struct aa_label *cred_label(const struct cred *cred)
|
||||
static inline void set_cred_label(const struct cred *cred,
|
||||
struct aa_label *label)
|
||||
{
|
||||
struct aa_label **blob = cred->security;
|
||||
struct aa_label **blob = cred->security + apparmor_blob_sizes.lbs_cred;
|
||||
|
||||
AA_BUG(!blob);
|
||||
*blob = label;
|
||||
|
Reference in New Issue
Block a user