summaryrefslogtreecommitdiffstats
path: root/include/linux/security.h
diff options
context:
space:
mode:
authorMatthew Garrett <mjg59@google.com>2018-01-08 13:36:19 -0800
committerMimi Zohar <zohar@linux.vnet.ibm.com>2018-03-23 06:31:11 -0400
commit3ec30113264a7bcd389f51d1738e42da0f41bb5a (patch)
tree75a1465c8f53522dafcf2d41085c925cb025e29f /include/linux/security.h
parent5893ed18a26d1f56b97c0290b0cbbc2d49d6de28 (diff)
downloadblackbird-op-linux-3ec30113264a7bcd389f51d1738e42da0f41bb5a.tar.gz
blackbird-op-linux-3ec30113264a7bcd389f51d1738e42da0f41bb5a.zip
security: Add a cred_getsecid hook
For IMA purposes, we want to be able to obtain the prepared secid in the bprm structure before the credentials are committed. Add a cred_getsecid hook that makes this possible. Signed-off-by: Matthew Garrett <mjg59@google.com> Acked-by: Paul Moore <paul@paul-moore.com> Cc: Paul Moore <paul@paul-moore.com> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'include/linux/security.h')
-rw-r--r--include/linux/security.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index 3f5fd988ee87..116b8717a98c 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -324,6 +324,7 @@ int security_cred_alloc_blank(struct cred *cred, gfp_t gfp);
void security_cred_free(struct cred *cred);
int security_prepare_creds(struct cred *new, const struct cred *old, gfp_t gfp);
void security_transfer_creds(struct cred *new, const struct cred *old);
+void security_cred_getsecid(const struct cred *c, u32 *secid);
int security_kernel_act_as(struct cred *new, u32 secid);
int security_kernel_create_files_as(struct cred *new, struct inode *inode);
int security_kernel_module_request(char *kmod_name);
OpenPOWER on IntegriCloud