]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tty-ask-pw-agent: properly propagate error 16860/head
authorLennart Poettering <lennart@poettering.net>
Wed, 26 Aug 2020 21:10:50 +0000 (23:10 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 26 Aug 2020 21:10:50 +0000 (23:10 +0200)
src/tty-ask-password-agent/tty-ask-password-agent.c

index 096b90c2aa3728fec66421487603bbf93195bf3b..87779a4dd6eda9a1425cf4550fb35f4ccc1b2fc8 100644 (file)
@@ -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) {