diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-02-14 14:30:30 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-02-14 14:30:30 +0100 |
commit | c2b32159413aec1dc8162c4423f04ebb6da68476 (patch) | |
tree | a507f34c60e26cb6fb5fe6fafefffdc7bcfc4fb8 /src/tty-ask-password-agent | |
parent | terminal-util: add some explanatory comments (diff) | |
download | systemd-c2b32159413aec1dc8162c4423f04ebb6da68476.tar.xz systemd-c2b32159413aec1dc8162c4423f04ebb6da68476.zip |
tty-ask-password-agent: reenable color for boot-time password prompt
The password prompt used to be highlighted, and that was a good thing.
Let's fix things to make the prompt highlighted again.
Fixes: #3853
Diffstat (limited to 'src/tty-ask-password-agent')
-rw-r--r-- | src/tty-ask-password-agent/tty-ask-password-agent.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index be7889202c..c52a19dc37 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -377,10 +377,12 @@ static int parse_password(const char *filename, char **wall) { r = reset_terminal_fd(tty_fd, true); if (r < 0) log_warning_errno(r, "Failed to reset terminal, ignoring: %m"); - } - r = ask_password_tty(tty_fd, message, NULL, not_after, echo ? ASK_PASSWORD_ECHO : 0, filename, &password); + r = ask_password_tty(tty_fd, message, NULL, not_after, + (echo ? ASK_PASSWORD_ECHO : 0) | + (arg_console ? ASK_PASSWORD_CONSOLE_COLOR : 0), + filename, &password); if (arg_console) { tty_fd = safe_close(tty_fd); |