diff options
Diffstat (limited to 'security/keys/keyring.c')
-rw-r--r-- | security/keys/keyring.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/security/keys/keyring.c b/security/keys/keyring.c index 87eff32b53f4..eeef1a073db4 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c | |||
@@ -531,15 +531,14 @@ EXPORT_SYMBOL(keyring_search); | |||
531 | * RCU is used to make it unnecessary to lock the keyring key list here. | 531 | * RCU is used to make it unnecessary to lock the keyring key list here. |
532 | * | 532 | * |
533 | * Returns a pointer to the found key with usage count incremented if | 533 | * Returns a pointer to the found key with usage count incremented if |
534 | * successful and returns -ENOKEY if not found. Revoked keys and keys not | 534 | * successful and returns -ENOKEY if not found. Revoked and invalidated keys |
535 | * providing the requested permission are skipped over. | 535 | * are skipped over. |
536 | * | 536 | * |
537 | * If successful, the possession indicator is propagated from the keyring ref | 537 | * If successful, the possession indicator is propagated from the keyring ref |
538 | * to the returned key reference. | 538 | * to the returned key reference. |
539 | */ | 539 | */ |
540 | key_ref_t __keyring_search_one(key_ref_t keyring_ref, | 540 | key_ref_t __keyring_search_one(key_ref_t keyring_ref, |
541 | const struct keyring_index_key *index_key, | 541 | const struct keyring_index_key *index_key) |
542 | key_perm_t perm) | ||
543 | { | 542 | { |
544 | struct keyring_list *klist; | 543 | struct keyring_list *klist; |
545 | struct key *keyring, *key; | 544 | struct key *keyring, *key; |
@@ -560,8 +559,6 @@ key_ref_t __keyring_search_one(key_ref_t keyring_ref, | |||
560 | if (key->type == index_key->type && | 559 | if (key->type == index_key->type && |
561 | (!key->type->match || | 560 | (!key->type->match || |
562 | key->type->match(key, index_key->description)) && | 561 | key->type->match(key, index_key->description)) && |
563 | key_permission(make_key_ref(key, possessed), | ||
564 | perm) == 0 && | ||
565 | !(key->flags & ((1 << KEY_FLAG_INVALIDATED) | | 562 | !(key->flags & ((1 << KEY_FLAG_INVALIDATED) | |
566 | (1 << KEY_FLAG_REVOKED))) | 563 | (1 << KEY_FLAG_REVOKED))) |
567 | ) | 564 | ) |