summaryrefslogtreecommitdiff
path: root/include/linux/key.h
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2023-08-24 17:39:13 +0300
committerKeith Busch <kbusch@kernel.org>2023-10-11 20:11:54 +0300
commit037c34318a479294cdb98dc8018edd5d191b68c0 (patch)
tree66057f8471e73a0bdc3ac1f0589c13eacb48d598 /include/linux/key.h
parent501cc6f4aca8dc0958c4d9716f0233ba7cff4830 (diff)
downloadlinux-037c34318a479294cdb98dc8018edd5d191b68c0.tar.xz
security/keys: export key_lookup()
For in-kernel consumers one cannot readily assign a user (eg when running from a workqueue), so the normal key search permissions cannot be applied. This patch exports the 'key_lookup()' function for a simple lookup of keys without checking for permissions. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'include/linux/key.h')
-rw-r--r--include/linux/key.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/key.h b/include/linux/key.h
index 938d7ecfb495..943a432da3ae 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -515,6 +515,7 @@ extern void key_init(void);
#define key_init() do { } while(0)
#define key_free_user_ns(ns) do { } while(0)
#define key_remove_domain(d) do { } while(0)
+#define key_lookup(k) NULL
#endif /* CONFIG_KEYS */
#endif /* __KERNEL__ */