diff options
author | Sebastian Blunt <sebastian@c4k3.net> | 2021-05-15 05:39:54 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-05-15 16:23:56 +0200 |
commit | 1fa94a312447f80d67e1883142f532927ff793e7 (patch) | |
tree | 6a9e99c73a3565bb665656b08824867a52ecb1f7 /src/tty-ask-password-agent | |
parent | test: combine stdout/stderr from failed test (diff) | |
download | systemd-1fa94a312447f80d67e1883142f532927ff793e7.tar.xz systemd-1fa94a312447f80d67e1883142f532927ff793e7.zip |
Add crypttab option silent
Adds a crypttab option 'silent' that enables the AskPasswordFlag
ASK_PASSWORD_SILENT. This allows usage of systemd-cryptsetup to default
to silent mode, rather than requiring the user to press tab every time.
Diffstat (limited to 'src/tty-ask-password-agent')
-rw-r--r-- | src/tty-ask-password-agent/tty-ask-password-agent.c | 4 |
1 files changed, 3 insertions, 1 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 ceacb61bf1..e056853f31 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -169,7 +169,7 @@ static int agent_ask_password_tty( static int process_one_password_file(const char *filename) { _cleanup_free_ char *socket_name = NULL, *message = NULL; - bool accept_cached = false, echo = false; + bool accept_cached = false, echo = false, silent = false; uint64_t not_after = 0; unsigned pid = 0; @@ -180,6 +180,7 @@ static int process_one_password_file(const char *filename) { { "Ask", "PID", config_parse_unsigned, 0, &pid }, { "Ask", "AcceptCached", config_parse_bool, 0, &accept_cached }, { "Ask", "Echo", config_parse_bool, 0, &echo }, + { "Ask", "Silent", config_parse_bool, 0, &silent }, {} }; @@ -239,6 +240,7 @@ static int process_one_password_file(const char *filename) { SET_FLAG(flags, ASK_PASSWORD_ACCEPT_CACHED, accept_cached); SET_FLAG(flags, ASK_PASSWORD_CONSOLE_COLOR, arg_console); SET_FLAG(flags, ASK_PASSWORD_ECHO, echo); + SET_FLAG(flags, ASK_PASSWORD_SILENT, silent); if (arg_plymouth) r = ask_password_plymouth(message, not_after, flags, filename, &passwords); |