mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Fix wrong return value on error in keyring utils.
keyring_link_key_to_keyring_key_type could accidentaly mask an unreachable key and make it look that key was succesfully linked in custome keyring when it was not.
This commit is contained in:
committed by
Milan Broz
parent
b0610e1f73
commit
4872a14830
@@ -351,7 +351,7 @@ static int keyring_link_key_to_keyring_key_type(const char *type_name, const cha
|
||||
} while (kid < 0 && errno == EINTR);
|
||||
|
||||
if (kid < 0)
|
||||
return 0;
|
||||
return -errno;
|
||||
|
||||
/* see https://mjg59.dreamwidth.org/37333.html */
|
||||
if (keyring_to_link == KEY_SPEC_USER_KEYRING || keyring_to_link == KEY_SPEC_USER_SESSION_KEYRING)
|
||||
|
||||
Reference in New Issue
Block a user