aboutsummaryrefslogtreecommitdiff
path: root/security/keys
diff options
context:
space:
mode:
authorHannes Reinecke2023-08-24 16:39:13 +0200
committerKeith Busch2023-10-11 10:11:54 -0700
commit037c34318a479294cdb98dc8018edd5d191b68c0 (patch)
tree66057f8471e73a0bdc3ac1f0589c13eacb48d598 /security/keys
parent501cc6f4aca8dc0958c4d9716f0233ba7cff4830 (diff)
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 'security/keys')
-rw-r--r--security/keys/key.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/security/keys/key.c b/security/keys/key.c
index 5c0c7df833f8..0260a1902922 100644
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -693,6 +693,7 @@ error:
spin_unlock(&key_serial_lock);
return key;
}
+EXPORT_SYMBOL(key_lookup);
/*
* Find and lock the specified key type against removal.