diff options
author | David Howells <dhowells@redhat.com> | 2011-06-13 22:33:52 +0100 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2011-06-14 15:03:29 +1000 |
commit | 4d67431f80b1b822f0286afc9123ee453eac7334 (patch) | |
tree | 47ae7c273186e49a49440f95d0655cc538e2b829 /security/keys/request_key_auth.c | |
parent | 2ce9738bac1b386f46e8478fd2c263460e7c2b09 (diff) | |
download | linux-4d67431f80b1b822f0286afc9123ee453eac7334.tar.bz2 |
KEYS: Don't return EAGAIN to keyctl_assume_authority()
Don't return EAGAIN to keyctl_assume_authority() to indicate that a key could
not be found (ENOKEY is only returned if a negative key is found). Instead
return ENOKEY in both cases.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/keys/request_key_auth.c')
-rw-r--r-- | security/keys/request_key_auth.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/security/keys/request_key_auth.c b/security/keys/request_key_auth.c index 6cff37529b80..60d4e3f5e4bb 100644 --- a/security/keys/request_key_auth.c +++ b/security/keys/request_key_auth.c @@ -251,6 +251,8 @@ struct key *key_get_instantiation_authkey(key_serial_t target_id) if (IS_ERR(authkey_ref)) { authkey = ERR_CAST(authkey_ref); + if (authkey == ERR_PTR(-EAGAIN)) + authkey = ERR_PTR(-ENOKEY); goto error; } |