From a4fd6cd3f575eb7e1452a74c2e35548739e3b252 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 26 Aug 2020 23:10:50 +0200 Subject: tty-ask-pw-agent: properly propagate error --- src/tty-ask-password-agent/tty-ask-password-agent.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/tty-ask-password-agent') 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 096b90c2aa..87779a4dd6 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -143,8 +143,7 @@ static int agent_ask_password_tty( const char *flag_file, char ***ret) { - int tty_fd = -1; - int r; + int tty_fd = -1, r; if (arg_console) { const char *con = arg_device ?: "/dev/console"; @@ -166,7 +165,7 @@ static int agent_ask_password_tty( release_terminal(); } - return 0; + return r; } static int process_one_password_file(const char *filename) { -- cgit v1.2.1