aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/lsm_hook_defs.h
diff options
context:
space:
mode:
authorCasey Schaufler <casey@schaufler-ca.com>2024-10-23 14:21:56 -0700
committerPaul Moore <paul@paul-moore.com>2024-12-04 14:58:09 -0500
commit76ecf306ae5da84ef8f48c7a2608736e6866440c (patch)
tree1a16d52f50d469cfa8ebdac9e84e597afb48b065 /include/linux/lsm_hook_defs.h
parentlsm: replace context+len with lsm_context (diff)
downloadwireguard-linux-76ecf306ae5da84ef8f48c7a2608736e6866440c.tar.xz
wireguard-linux-76ecf306ae5da84ef8f48c7a2608736e6866440c.zip
lsm: use lsm_context in security_inode_getsecctx
Change the security_inode_getsecctx() interface to fill a lsm_context structure instead of data and length pointers. This provides the information about which LSM created the context so that security_release_secctx() can use the correct hook. Cc: linux-nfs@vger.kernel.org Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> [PM: subject tweak] Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to '')
-rw-r--r--include/linux/lsm_hook_defs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h
index 01e5a8e09bba..69e1076448c6 100644
--- a/include/linux/lsm_hook_defs.h
+++ b/include/linux/lsm_hook_defs.h
@@ -303,8 +303,8 @@ LSM_HOOK(void, LSM_RET_VOID, release_secctx, struct lsm_context *cp)
LSM_HOOK(void, LSM_RET_VOID, inode_invalidate_secctx, struct inode *inode)
LSM_HOOK(int, 0, inode_notifysecctx, struct inode *inode, void *ctx, u32 ctxlen)
LSM_HOOK(int, 0, inode_setsecctx, struct dentry *dentry, void *ctx, u32 ctxlen)
-LSM_HOOK(int, -EOPNOTSUPP, inode_getsecctx, struct inode *inode, void **ctx,
- u32 *ctxlen)
+LSM_HOOK(int, -EOPNOTSUPP, inode_getsecctx, struct inode *inode,
+ struct lsm_context *cp)
#if defined(CONFIG_SECURITY) && defined(CONFIG_WATCH_QUEUE)
LSM_HOOK(int, 0, post_notification, const struct cred *w_cred,