mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-17 22:23:45 -04:00
lsm: create new security_cred_getlsmprop LSM hook
Create a new LSM hook security_cred_getlsmprop() which, like security_cred_getsecid(), fetches LSM specific attributes from the cred structure. The associated data elements in the audit sub-system are changed from a secid to a lsm_prop to accommodate multiple possible LSM audit users. Cc: linux-integrity@vger.kernel.org Cc: audit@vger.kernel.org Cc: selinux@vger.kernel.org Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> [PM: subj line tweak] Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
committed by
Paul Moore
parent
e0a8dcbd53
commit
b0654ca429
@@ -3272,6 +3272,21 @@ void security_cred_getsecid(const struct cred *c, u32 *secid)
|
||||
}
|
||||
EXPORT_SYMBOL(security_cred_getsecid);
|
||||
|
||||
/**
|
||||
* security_cred_getlsmprop() - Get the LSM data from a set of credentials
|
||||
* @c: credentials
|
||||
* @prop: destination for the LSM data
|
||||
*
|
||||
* Retrieve the security data of the cred structure @c. In case of
|
||||
* failure, @prop will be cleared.
|
||||
*/
|
||||
void security_cred_getlsmprop(const struct cred *c, struct lsm_prop *prop)
|
||||
{
|
||||
lsmprop_init(prop);
|
||||
call_void_hook(cred_getlsmprop, c, prop);
|
||||
}
|
||||
EXPORT_SYMBOL(security_cred_getlsmprop);
|
||||
|
||||
/**
|
||||
* security_kernel_act_as() - Set the kernel credentials to act as secid
|
||||
* @new: credentials
|
||||
|
||||
Reference in New Issue
Block a user