diff options
author | David Howells <dhowells@redhat.com> | 2020-02-12 16:58:35 +0300 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2020-05-19 17:16:08 +0300 |
commit | 998f50407ffc9370565c7ed3fcd1366adccdfbbf (patch) | |
tree | f3c28ad22a9d75c557e399d83ac4d06426dd5c8e /include/linux/lsm_hook_defs.h | |
parent | c73be61cede5882f9605a852414db559c0ebedfd (diff) | |
download | linux-998f50407ffc9370565c7ed3fcd1366adccdfbbf.tar.xz |
security: Add hooks to rule on setting a watch
Add security hooks that will allow an LSM to rule on whether or not a watch
may be set. More than one hook is required as the watches watch different
types of object.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: James Morris <jamorris@linux.microsoft.com>
cc: Casey Schaufler <casey@schaufler-ca.com>
cc: Stephen Smalley <sds@tycho.nsa.gov>
cc: linux-security-module@vger.kernel.org
Diffstat (limited to 'include/linux/lsm_hook_defs.h')
-rw-r--r-- | include/linux/lsm_hook_defs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h index e0def45b5cc5..a54f49e95708 100644 --- a/include/linux/lsm_hook_defs.h +++ b/include/linux/lsm_hook_defs.h @@ -256,6 +256,10 @@ LSM_HOOK(int, 0, inode_getsecctx, struct inode *inode, void **ctx, #if defined(CONFIG_SECURITY) && defined(CONFIG_WATCH_QUEUE) LSM_HOOK(int, 0, post_notification, const struct cred *w_cred, const struct cred *cred, struct watch_notification *n) +#endif /* CONFIG_SECURITY && CONFIG_WATCH_QUEUE */ + +#if defined(CONFIG_SECURITY) && defined(CONFIG_KEY_NOTIFICATIONS) +LSM_HOOK(int, 0, watch_key, struct key *key) #endif /* CONFIG_SECURITY && CONFIG_KEY_NOTIFICATIONS */ #ifdef CONFIG_SECURITY_NETWORK |