summaryrefslogtreecommitdiff
path: root/src/tty-ask-password-agent
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-06-26 12:16:18 +0200
committerLennart Poettering <lennart@poettering.net>2012-06-26 12:21:43 +0200
commitaf6da548aa14c57da7f17b3a1f2211efdb811d19 (patch)
treee118258cb9795ee0b80b656c9aca121cf7bc8b3e /src/tty-ask-password-agent
parent0c7f15b3a95c3596a4756de5c44eb1fdcd0034fc (diff)
core: make systemd.confirm_spawn=1 actually work
This adds a timeout if the TTY cannot be acquired and makes sure we always output the question to the console, never to the TTY of the respective service.
Diffstat (limited to 'src/tty-ask-password-agent')
-rw-r--r--src/tty-ask-password-agent/tty-ask-password-agent.c2
1 files changed, 1 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 7f537c2740..0dec0629c0 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -368,7 +368,7 @@ static int parse_password(const char *filename, char **wall) {
char *password;
if (arg_console)
- if ((tty_fd = acquire_terminal("/dev/console", false, false, false)) < 0) {
+ if ((tty_fd = acquire_terminal("/dev/console", false, false, false, (usec_t) -1)) < 0) {
r = tty_fd;
goto finish;
}