mirror of
https://github.com/systemd/systemd.git
synced 2025-01-05 13:18:06 +03:00
Merge pull request #11297 from yuwata/fix-11295
ask-password: fix assertion
This commit is contained in:
commit
339725910a
@ -156,7 +156,7 @@ static int add_to_keyring_and_log(const char *keyname, AskPasswordFlags flags, c
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ask_password_keyring(const char *keyname, AskPasswordFlags flags, char ***ret) {
|
static int ask_password_keyring(const char *keyname, AskPasswordFlags flags, char ***ret) {
|
||||||
|
|
||||||
key_serial_t serial;
|
key_serial_t serial;
|
||||||
int r;
|
int r;
|
||||||
@ -341,7 +341,7 @@ int ask_password_tty(
|
|||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (notify >= 0 && pollfd[POLL_INOTIFY].revents != 0) {
|
if (notify >= 0 && pollfd[POLL_INOTIFY].revents != 0 && keyname) {
|
||||||
(void) flush_fd(notify);
|
(void) flush_fd(notify);
|
||||||
|
|
||||||
r = ask_password_keyring(keyname, flags, ret);
|
r = ask_password_keyring(keyname, flags, ret);
|
||||||
|
@ -17,5 +17,4 @@ typedef enum AskPasswordFlags {
|
|||||||
|
|
||||||
int ask_password_tty(int tty_fd, const char *message, const char *keyname, usec_t until, AskPasswordFlags flags, const char *flag_file, char ***ret);
|
int ask_password_tty(int tty_fd, const char *message, const char *keyname, usec_t until, AskPasswordFlags flags, const char *flag_file, char ***ret);
|
||||||
int ask_password_agent(const char *message, const char *icon, const char *id, const char *keyname, usec_t until, AskPasswordFlags flag, char ***ret);
|
int ask_password_agent(const char *message, const char *icon, const char *id, const char *keyname, usec_t until, AskPasswordFlags flag, char ***ret);
|
||||||
int ask_password_keyring(const char *keyname, AskPasswordFlags flags, char ***ret);
|
|
||||||
int ask_password_auto(const char *message, const char *icon, const char *id, const char *keyname, usec_t until, AskPasswordFlags flag, char ***ret);
|
int ask_password_auto(const char *message, const char *icon, const char *id, const char *keyname, usec_t until, AskPasswordFlags flag, char ***ret);
|
||||||
|
Loading…
Reference in New Issue
Block a user