UBUNTU: SAUCE: apparmor4.0.0: LSM stacking v39: fix build error with CONFIG_SECURITY=n
When CONFIG_SECURITY=n we are not initializing lsmblob correctly in
security_cred_getlsmblob().
Fix by calling lsmblob_init() properly.
Fixes: 4d652c1a90a7 ("UBUNTU: SAUCE: apparmor4.0.0 [13/87]: LSM stacking v39: LSM: Create new security_cred_getlsmblob LSM hook")
Reported-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
This commit is contained in:
committed by
Paolo Pisati
parent
f66e3b30a9
commit
c606b10c1c
@@ -1171,7 +1171,7 @@ static inline void security_cred_getsecid(const struct cred *c, u32 *secid)
|
||||
static inline void security_cred_getlsmblob(const struct cred *c,
|
||||
struct lsmblob *blob)
|
||||
{
|
||||
*secid = 0;
|
||||
lsmblob_init(blob);
|
||||
}
|
||||
|
||||
static inline int security_kernel_act_as(struct cred *cred, u32 secid)
|
||||
|
||||
Reference in New Issue
Block a user