Skip to content

Commit

Permalink
KEYS: Don't return EAGAIN to keyctl_assume_authority()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
dhowells authored and James Morris committed Jun 14, 2011
1 parent 2ce9738 commit 4d67431
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions security/keys/request_key_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4d67431

Please sign in to comment.