diff options
author | Rob Austein <sra@hactrn.net> | 2016-11-21 09:25:16 -0500 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-11-21 09:25:16 -0500 |
commit | 834924b3e4d827f6db03d307a88e23bf95dc4624 (patch) | |
tree | baebdd517774752801f7209656446a49e40ea9c1 | |
parent | f4b6098c2359a75cc16275aad7ba2bf001261dea (diff) |
pkey_match() should just skip keys it lacks permission to read.
-rw-r--r-- | rpc_pkey.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -945,7 +945,15 @@ static hal_error_t pkey_local_match(const hal_client_handle_t client, hal_ks_t *ks = NULL; hal_error_t err; - if ((err = check_readable(client, flags)) != HAL_OK) + err = check_readable(client, flags); + + if (err == HAL_ERROR_FORBIDDEN) { + assert(result_len != NULL); + *result_len = 0; + return HAL_OK; + } + + if (err != HAL_OK) return err; if ((err = ks_open_from_flags(&ks, flags)) == HAL_OK && |