summaryrefslogtreecommitdiffstats
path: root/security/keys/compat.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-05-30 15:53:10 +0200
committerDavid Howells <dhowells@redhat.com>2019-06-19 14:27:45 +0200
commit45e0f30c30bb131663fbe1752974d6f2e39611e2 (patch)
tree7679786ee974e03e277c871e68491921e491cdd8 /security/keys/compat.c
parentkeys: Reuse keyring_index_key::desc_len in lookup_user_key() (diff)
downloadlinux-45e0f30c30bb131663fbe1752974d6f2e39611e2.tar.xz
linux-45e0f30c30bb131663fbe1752974d6f2e39611e2.zip
keys: Add capability-checking keyctl function
Add a keyctl function that requests a set of capability bits to find out what features are supported. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'security/keys/compat.c')
-rw-r--r--security/keys/compat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/security/keys/compat.c b/security/keys/compat.c
index b326bc4f84d7..a53e30da20c5 100644
--- a/security/keys/compat.c
+++ b/security/keys/compat.c
@@ -162,6 +162,9 @@ COMPAT_SYSCALL_DEFINE5(keyctl, u32, option,
case KEYCTL_MOVE:
return keyctl_keyring_move(arg2, arg3, arg4, arg5);
+ case KEYCTL_CAPABILITIES:
+ return keyctl_capabilities(compat_ptr(arg2), arg3);
+
default:
return -EOPNOTSUPP;
}