Re: [Openvpn-devel] [PATCH v2] Fix M_ERRNO behavior on Windows

2022-07-22 Thread Gert Doering
Hi, On Fri, Jul 22, 2022 at 04:34:40PM -0400, Selva Nair wrote: > This one is tricky -- though the patch appeared to be a no-op for > non-Windows, in error.c:x_check_status(), it did move down the line > my_errno = openvpn_errno() and thus potentially lose the original error. At > that time it

[Openvpn-devel] [PATCH] In x_check_status() read errno early

2022-07-22 Thread selva . nair
From: Selva Nair The correct errno can get overwritten by the call to format_extended_socket_error() which may set errno to EAGAIN losing the original error and cause to bypass the error reporting below. Fix by reading the errno of interest at the top of the function. Reported by: Gert Doering

Re: [Openvpn-devel] [PATCH v2] Fix M_ERRNO behavior on Windows

2022-07-22 Thread Selva Nair
On Fri, Jul 22, 2022 at 12:17 PM Gert Doering wrote: > Hi, > > On Tue, May 03, 2022 at 03:28:40AM +0300, Lev Stipakov wrote: > > From: Lev Stipakov > > > > We use M_ERRNO flag in logging to display error code > > and error message. This has been broken on Windows, > > where we use error code

Re: [Openvpn-devel] [PATCH v2] Fix M_ERRNO behavior on Windows

2022-07-22 Thread Gert Doering
Hi, On Tue, May 03, 2022 at 03:28:40AM +0300, Lev Stipakov wrote: > From: Lev Stipakov > > We use M_ERRNO flag in logging to display error code > and error message. This has been broken on Windows, > where we use error code from GetLastError() and > error description from strerror(). strerror()

[Openvpn-devel] [PATCH applied] Re: t_client: Allow to force FAIL on prerequisite fails

2022-07-22 Thread Gert Doering
Acked-by: Gert Doering "makes sense" - in a buildbot (or any other CI) environment, do not silently skip missing prereqs, but fail hard. Tested with "make check" ;-) - with and without TCLIENT_SKIP_RC=1 and RUN_SUDO=doas / RUN_SUDO=false, etc. Your patch has been applied to the master branch.

[Openvpn-devel] [PATCH applied] Re: Fix segfault when no --config argument is given

2022-07-22 Thread Gert Doering
Acked-by: Gert Doering Tested with and without --config, AND with "make check"! Your patch has been applied to the master branch. commit 6a0fcced7c44ae03a15e2ee28cd1867171c2c988 Author: Arne Schwabe Date: Fri Jul 22 15:46:52 2022 +0200 Fix segfault when no --config argument is given

[Openvpn-devel] [PATCH] t_client: Allow to force FAIL on prerequisite fails

2022-07-22 Thread Frank Lichtenheld
In automated tests we want the build to fail if the worker node is configured incorrectly. Signed-off-by: Frank Lichtenheld --- tests/t_client.sh.in | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in index

[Openvpn-devel] [PATCH] Fix segfault when no --config argument is given

2022-07-22 Thread Arne Schwabe
Commit 4df5003 introduced a check against options->config but did not ensure that this varialbe is non-null. --- src/openvpn/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index b9de2e5d0..a68a2991f 100644 ---

[Openvpn-devel] [PATCH applied] Re: Error out if both remap-usr1 SIGHUP and config stdin are used

2022-07-22 Thread Gert Doering
Acked-by: Gert Doering All bugs fixed, SOB added, v2 implied! Does what it says on the lid... $ openvpn --config stdin --remap-usr1 SIGHUP --dev null Options error: Options 'config stdin' and 'remap-usr1 SIGHUP' are incompatible with each other. Your patch has been applied to the master

[Openvpn-devel] [PATCH] Error out if both remap-usr1 SIGHUP and config stdin are used

2022-07-22 Thread Arne Schwabe
OpenVPN for Android uses config stdin to avoid writing the config file containing private keys to 'disk'. However using stdin means that config cannot be reread using SIGHUP. While there might be other corner cases that trigger SIGHUP, this is an obvious one, so we error out if we detect this

Re: [Openvpn-devel] [PATCH] Error out if both remap-usr1 SIGHUP and config stdin are used

2022-07-22 Thread Frank Lichtenheld
On Fri, Jul 22, 2022 at 02:51:22PM +0200, Arne Schwabe wrote: > OpenVPN for Android uses config stdin to avoid writing the config > file containing private keys to 'disk'. However using stdin means > that config cannot be reread using SIGHUP. While there might be other > corner cases that trigger

[Openvpn-devel] [PATCH] Error out if both remap-usr1 SIGHUP and config stdin are used

2022-07-22 Thread Arne Schwabe
OpenVPN for Android uses config stdin to avoid writing the config file containing private keys to 'disk'. However using stdin means that config cannot be reread using SIGHUP. While there might be other corner cases that trigger SIGHUP, this is an obvious one, so we error out if we detect this