File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -99,8 +99,7 @@ extern void __key_link_end(struct key *keyring,
9999 unsigned long prealloc );
100100
101101extern key_ref_t __keyring_search_one (key_ref_t keyring_ref ,
102- const struct keyring_index_key * index_key ,
103- key_perm_t perm );
102+ const struct keyring_index_key * index_key );
104103
105104extern struct key * keyring_search_instkey (struct key * keyring ,
106105 key_serial_t target_id );
Original file line number Diff line number Diff line change @@ -847,7 +847,7 @@ key_ref_t key_create_or_update(key_ref_t keyring_ref,
847847 * update that instead if possible
848848 */
849849 if (index_key .type -> update ) {
850- key_ref = __keyring_search_one (keyring_ref , & index_key , 0 );
850+ key_ref = __keyring_search_one (keyring_ref , & index_key );
851851 if (!IS_ERR (key_ref ))
852852 goto found_matching_key ;
853853 }
Original file line number Diff line number Diff line change @@ -531,15 +531,14 @@ EXPORT_SYMBOL(keyring_search);
531531 * RCU is used to make it unnecessary to lock the keyring key list here.
532532 *
533533 * 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
535- * providing the requested permission are skipped over.
534+ * successful and returns -ENOKEY if not found. Revoked and invalidated keys
535+ * are skipped over.
536536 *
537537 * If successful, the possession indicator is propagated from the keyring ref
538538 * to the returned key reference.
539539 */
540540key_ref_t __keyring_search_one (key_ref_t keyring_ref ,
541- const struct keyring_index_key * index_key ,
542- key_perm_t perm )
541+ const struct keyring_index_key * index_key )
543542{
544543 struct keyring_list * klist ;
545544 struct key * keyring , * key ;
@@ -560,8 +559,6 @@ key_ref_t __keyring_search_one(key_ref_t keyring_ref,
560559 if (key -> type == index_key -> type &&
561560 (!key -> type -> match ||
562561 key -> type -> match (key , index_key -> description )) &&
563- key_permission (make_key_ref (key , possessed ),
564- perm ) == 0 &&
565562 !(key -> flags & ((1 << KEY_FLAG_INVALIDATED ) |
566563 (1 << KEY_FLAG_REVOKED )))
567564 )
You can’t perform that action at this time.
0 commit comments