Remove system password timeout
cover Remove system password timeout
PR: https://github.com/OpenVPN/openvpn/pull/649
Thanks,
--Ben
Ben Boeckel (1):
console_systemd: remove the timeout when using systemd-ask-password
src/openvpn/console_systemd.c | 1 + 1 file changed, 1 insertion(+)
base-commit: cb878882388bfe9dc49b116190c5c6ae8918322d
Signature · 1 line
2.47.1
PATCH 1/1 console_systemd: remove the timeout when using `systemd-ask-password`
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.
--- src/openvpn/console_systemd.c | 1 + 1 file changed, 1 insertion(+)
src/openvpn/console_systemd.c +1 -0
@@ -71,6 +71,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 )
Signature · 1 line
2.47.1
Re: [Openvpn-devel] [PATCH 1/1] console_systemd: remove the timeout when using `systemd-ask-password`
Quoted 14 lines · Ben Boeckel via Openvpn-devel
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.
--- src/openvpn/console_systemd.c | 1 + 1 file changed, 1 insertion(+)src/openvpn/console_systemd.c +0
-0
src/openvpn/console_systemd.c get_console_input_systemd(const char *prompt, const bool echo, char *input, cons · line 77
Quoted 7 lines
src/openvpn/console_systemd.c +1
-0@@ -71,6 +71,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 )
Thanks a lot! Since I wrote this integration years ago ... I'd like to chime in here.
Generally, change looks conceptually good and I agree to the reasoning for this change. What I'd like to ensure is that we're not hitting some systemd version regression situations.
The oldest Linux distributions OpenVPN 2.x care about today are, to my knowledge, RHEL/Alma Linux/Rocky Linux 8 on the RPM side. On the .deb side of things, I believe Debian 12 is the oldest supported stable release.
From what I see, RHEL-8 ships with systemd v239, which has this argument. I don't have a Debian 12 (or 11, if OpenVPN 2.x is still supported there) handy now to check.
Given that the oldest Linux distro with systemd which supports the --timeout argument in systemd-ask-password, this can get my ACK.
Signature · 4 lines
kind regards, David Sommerseth OpenVPN Inc
Re: [Openvpn-devel] [PATCH 1/1] console_systemd: remove the timeout when using `systemd-ask-password`
Quoted 2 lines · David Sommerseth
Given that the oldest Linux distro with systemd which supports the --timeout argument in systemd-ask-password, this can get my ACK.
Thanks. I thought to look at when it was introduced. It has been there (manpage documentation was added in commit f3bc7fdc7bf47193a9f8618a7d22a6ceec2df6f7) since 2011, released with systemd v25. I think we can assume anything using a modern openvpn is also using something newer than this as well.
--Ben
Re: [Openvpn-devel] [PATCH 1/1] console_systemd: remove the timeout when using `systemd-ask-password`
In reply to Ben BoeckelQuoted 14 lines · Ben Boeckel via Openvpn-devel
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.
--- src/openvpn/console_systemd.c | 1 + 1 file changed, 1 insertion(+)src/openvpn/console_systemd.c +0
-0
src/openvpn/console_systemd.c get_console_input_systemd(const char *prompt, const bool echo, char *input, cons · line 77
Quoted 7 lines
src/openvpn/console_systemd.c +1
-0@@ -71,6 +71,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 )
Given the confirmation by Ben in this reply [1], I give this my ACK. I've also double checked the git commit log in systemd to verify his finding.
[1] <https://www.mail-archive.com/[email protected]/msg30362.html>
Signature · 4 lines
kind regards, David Sommerseth OpenVPN Inc
Re: [Openvpn-devel] [PATCH 1/1] console_systemd: remove the timeout when using `systemd-ask-password`
Quoted 7 lines · David Sommerseth via Openvpn-devel
Given the confirmation by Ben in this reply [1], I give this my ACK. I've also double checked the git commit log in systemd to verify his finding.
[1] <https://www.mail-archive.com/[email protected]/msg30362.html>
I created https://gerrit.openvpn.net/c/openvpn/+/866 in Gerrit from this patch which contains the following clean-ups to the commit:
- Fix "Author:" line to not contain "Via OpenVPN-Devel"
- Add Signed-off-by line to commit message
Doing this as part of an experiment to add mail-submitted patches to Gerrit.
Regards,
Signature · 1 line
Frank Lichtenheld
Re: [Openvpn-devel] [PATCH 1/1] console_systemd: remove the timeout when using `systemd-ask-password`
Hi,
Quoted 2 lines · Frank Lichtenheld
Doing this as part of an experiment to add mail-submitted patches to Gerrit.
I *was* wondering since we had an ACK on the list already :-)
gert
Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany [email protected]...[Openvpn-devel] [PATCH applied] Re: console_systemd: remove the timeout when using 'systemd-ask-password'
In reply to Ben BoeckelI have taken this from the mailing list, as it has a thread hanging off it with an ACK in it - which is easier than making the gerrit submission a mail again, so it has a message-id to link to.
Not much to test here - it's a trivial addition of an argv argument, and if David says "this is good" then it is :-) (gerrit build tests also agree that it does not break anything).
Your patch has been applied to the master and release/2.6 branch (it could be argued whether it's a bugfix or a feature).
commit 8084990ccecbf803498419e553bc1a6f073f8175 (master) commit f67bd153a18192e0a8ed9b57738d8589f26369e3 (release/2.6)
Author: Ben Boeckel Date: Tue Dec 31 21:46:29 2024 +0100
console_systemd: remove the timeout when using 'systemd-ask-password'
Signed-off-by: Ben Boeckel <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg30336.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
Re: [Openvpn-devel] [PATCH applied] Re: console_systemd: remove the timeout when using 'systemd-ask-password'
Quoted 3 lines · Gert Doering
I have taken this from the mailing list, as it has a thread hanging off it with an ACK in it - which is easier than making the gerrit submission a mail again, so it has a message-id to link to.
Thanks!
Quoted 6 lines
Not much to test here - it's a trivial addition of an argv argument, and if David says "this is good" then it is :-) (gerrit build tests also agree that it does not break anything).
Your patch has been applied to the master and release/2.6 branch (it could be argued whether it's a bugfix or a feature).
Looking forward to it :) .
--Ben