Fix --askpass not allowing for password input via stdin
PATCH 1/1 Fix --askpass not allowing for password input via stdin
ACK to the attached (rebase by me) patch from trac:
https://community.openvpn.net/openvpn/ticket/248
-Steffan
From 0e132ca6733ede1f066b0cd717b1886a28e09d32 Mon Sep 17 00:00:00 2001
From: James Geboski <[email protected]...>
Date: Tue, 8 Jan 2013 17:52:57 -0500
Subject: [PATCH] Fix --askpass not allowing for password input via stdin
This resolves --askpass treating stdin as a file during the file access check. In turn, this leads to openvpn failing to start if this option is set to stdin.
By default, --askpass reads the certificate's password from stdin rather than a file. Without passing the CHKACC_ACPTSTDIN flag to check_file_access(), stdin is marked as being a nonexistent file.
--- src/openvpn/options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
src/openvpn/options.c +2 -2
@@ -2738,8 +2738,8 @@ options_postprocess_filechecks (struct options *options) options->packet_id_file, R_OK|W_OK, "--replay-persist");/* ** Password files ** */ - errs |=check_file_access (CHKACC_FILE , options->key_pass_file,R_OK , -"--askpass" ); + errs |=check_file_access (CHKACC_FILE |CHKACC_ACPTSTDIN , + options->key_pass_file,R_OK ,"--askpass" );#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_MANAGEMENT errs |= check_file_access (CHKACC_FILE|CHKACC_ACPTSTDIN,
Signature · 1 line
2.1.4
Your patch has been applied to the master and release/2.3 branch (took us long enough :-) - thanks).
commit 4e1e3ba1d8582a1e95dd6f9564e97c99784959a7 (master) commit 4d093fff305a3054d88ae2c803665cf90d512c7e (release/2.3)
Author: James Geboski Date: Tue Jan 8 17:52:57 2013 -0500
Fix --askpass not allowing for password input via stdin
Signed-off-by: James Geboski <[email protected]...>
Acked-by: Steffan Karger <[email protected]...>
Signed-off-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9918--
kind regards,
Gert Doering
A message that is not in the archive (sent off-list or not yet received): [email protected]...
Hi,
Quoted 4 lines · Mike Tancsa
Is this fix going to generate a new version of OpenVPN? I ran into
this bug this morning and manually patched it up for my installation. But if no new version is planned, I was going to ask the FreeBSD port maintainer to add this as a version patch for the port.
It will be in 2.3.8, to be released "soonish" (I'd say next week or the week after that). Depending how many more --daemon related corner cases show up...
I won't object to having it in the FreeBSD port until then... funny enough, we broke --askpass (stdin) in 2.3.2 and it did not *really* have an impact on people...
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...