]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
console_systemd: remove the timeout when using 'systemd-ask-password'
authorBen Boeckel <ben.boeckel@kitware.com>
Tue, 31 Dec 2024 20:46:29 +0000 (21:46 +0100)
committerGert Doering <gert@greenie.muc.de>
Tue, 14 Jan 2025 17:13:31 +0000 (18:13 +0100)
Without this, the password request will expire after 90 seconds leaving
no way to provide the password without OpenVPN asking for it again.
Given that interactive use will wait for input without a timeout, it
makes sense to have non-interactive usage also wait until the user is
ready instead of forcing users to race against the timeout.

Change-Id: I2791d09ab698d89dc7e0183151f77b84024ad6d1
Signed-off-by: Ben Boeckel <ben.boeckel@kitware.com>
Acked-By: David Sommerseth <davids@openvpn.net>
Message-Id: <20241231204629.1210040-2-ben.boeckel@kitware.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg30336.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/console_systemd.c

index 858504d5c01c1275352896beb8354f701a9f4e3e..91ebb354b7d87232fb82c72abdb52f57d48af473 100644 (file)
@@ -72,6 +72,7 @@ get_console_input_systemd(const char *prompt, const bool echo, char *input, cons
     }
 #endif
     argv_printf_cat(&argv, "--icon network-vpn");
+    argv_printf_cat(&argv, "--timeout=0");
     argv_printf_cat(&argv, "%s", prompt);
 
     if ((std_out = openvpn_popen(&argv, NULL)) < 0)