]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix regression of ignoring --user
authorArne Schwabe <arne@rfc2549.org>
Wed, 19 Oct 2022 13:36:27 +0000 (15:36 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 19 Oct 2022 14:09:11 +0000 (16:09 +0200)
commit66f6a3b7991d5316116ce7cb91dfa4d71d4df42f
treec2733986a1c39918e655865e8bf33e96c449501c
parent22bc63c78439ed23b974b8f822330d75ec79c7fc
Fix regression of ignoring --user

Commit facb6fffb changed a call in the style of if(a() | b())
to if(a() || b()). While this looks identical, it is not. The first
statement always executes b() while the second only executes b() if
a() returns false. This lead to to the platform_state_user never to
set as side effect and thus --user being ignored. Rewrite the code
to make this more explicit.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20221019133627.2918110-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25430.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/init.c