summaryrefslogtreecommitdiff
path: root/include/linux/lsm_hook_defs.h
diff options
context:
space:
mode:
authorCasey Schaufler <casey@schaufler-ca.com>2024-10-09 20:32:11 +0300
committerPaul Moore <paul@paul-moore.com>2024-10-11 21:34:12 +0300
commit6f2f724f0e116d9ea960ff3dd645add12e60e176 (patch)
tree8f9ed2193bbc3eabb023168cc07cc4ba74db7a78 /include/linux/lsm_hook_defs.h
parent870b7fdc660b38c4e1bd8bf48e62aa352ddf8f42 (diff)
downloadlinux-6f2f724f0e116d9ea960ff3dd645add12e60e176.tar.xz
lsm: add lsmprop_to_secctx hook
Add a new hook security_lsmprop_to_secctx() and its LSM specific implementations. The LSM specific code will use the lsm_prop element allocated for that module. This allows for the possibility that more than one module may be called upon to translate a secid to a string, as can occur in the audit code. Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> [PM: subject line tweak] Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'include/linux/lsm_hook_defs.h')
-rw-r--r--include/linux/lsm_hook_defs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h
index ea7f17e37756..ed6ea0b1ec57 100644
--- a/include/linux/lsm_hook_defs.h
+++ b/include/linux/lsm_hook_defs.h
@@ -294,6 +294,8 @@ LSM_HOOK(int, -EINVAL, setprocattr, const char *name, void *value, size_t size)
LSM_HOOK(int, 0, ismaclabel, const char *name)
LSM_HOOK(int, -EOPNOTSUPP, secid_to_secctx, u32 secid, char **secdata,
u32 *seclen)
+LSM_HOOK(int, -EOPNOTSUPP, lsmprop_to_secctx, struct lsm_prop *prop,
+ char **secdata, u32 *seclen)
LSM_HOOK(int, 0, secctx_to_secid, const char *secdata, u32 seclen, u32 *secid)
LSM_HOOK(void, LSM_RET_VOID, release_secctx, char *secdata, u32 seclen)
LSM_HOOK(void, LSM_RET_VOID, inode_invalidate_secctx, struct inode *inode)