diff options
author | David Howells <dhowells@redhat.com> | 2011-03-07 10:06:09 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2011-03-07 19:17:18 -0500 |
commit | fdd1b94581782a2ddf9124414e5b7a5f48ce2f9c (patch) | |
tree | ce83bfd1f0b1a7d4b9521bdb3d6afef1bff1d4f2 /security/keys/compat.c | |
parent | b9fffa3877a3ebbe0a5ad5a247358e2f7df15b24 (diff) |
KEYS: Add a new keyctl op to reject a key with a specified error code
Add a new keyctl op to reject a key with a specified error code. This works
much the same as negating a key, and so keyctl_negate_key() is made a special
case of keyctl_reject_key(). The difference is that keyctl_negate_key()
selects ENOKEY as the error to be reported.
Typically the key would be rejected with EKEYEXPIRED, EKEYREVOKED or
EKEYREJECTED, but this is not mandatory.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/keys/compat.c')
-rw-r--r-- | security/keys/compat.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/security/keys/compat.c b/security/keys/compat.c index 07a5f35e3970..17c99d0149ec 100644 --- a/security/keys/compat.c +++ b/security/keys/compat.c | |||
@@ -85,6 +85,9 @@ asmlinkage long compat_sys_keyctl(u32 option, | |||
85 | case KEYCTL_SESSION_TO_PARENT: | 85 | case KEYCTL_SESSION_TO_PARENT: |
86 | return keyctl_session_to_parent(); | 86 | return keyctl_session_to_parent(); |
87 | 87 | ||
88 | case KEYCTL_REJECT: | ||
89 | return keyctl_reject_key(arg2, arg3, arg4, arg5); | ||
90 | |||
88 | default: | 91 | default: |
89 | return -EOPNOTSUPP; | 92 | return -EOPNOTSUPP; |
90 | } | 93 | } |