mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
ask-password: don't hit assert() when we query pw which the user C-d and caching is enabled
This commit is contained in:
parent
07d5ed536e
commit
e013e10d0e
@ -105,10 +105,11 @@ static int add_to_keyring(const char *keyname, AskPasswordFlags flags, char **pa
|
||||
int r;
|
||||
|
||||
assert(keyname);
|
||||
assert(passwords);
|
||||
|
||||
if (!(flags & ASK_PASSWORD_PUSH_CACHE))
|
||||
return 0;
|
||||
if (strv_isempty(passwords))
|
||||
return 0;
|
||||
|
||||
r = lookup_key(keyname, &serial);
|
||||
if (r >= 0) {
|
||||
@ -147,7 +148,6 @@ static int add_to_keyring_and_log(const char *keyname, AskPasswordFlags flags, c
|
||||
int r;
|
||||
|
||||
assert(keyname);
|
||||
assert(passwords);
|
||||
|
||||
r = add_to_keyring(keyname, flags, passwords);
|
||||
if (r < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user