]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix OpenVPN querying user/password if auth-token with user expires
authorArne Schwabe <arne@rfc2549.org>
Sun, 9 Oct 2022 13:08:05 +0000 (15:08 +0200)
committerGert Doering <gert@greenie.muc.de>
Sun, 9 Oct 2022 13:37:40 +0000 (15:37 +0200)
commit7d291e10bccd1d6b9e584307fb5fe3ebfb114ec9
treed40ec6ab590589c01cc95f3011996475d3e8209a
parent39619b7fab213e9cadaa4a8b50b795ad63d9d91f
Fix OpenVPN querying user/password if auth-token with user expires

The problematic behaviour happens when starting a profile without
auth-user-pass and then connecting to a server that pushes auth-token.
When the auth token expires OpenVPN asks for auth User and password
again (but it shouldn't).

The problem is that the auth_user_pass_setup sets
auth_user_pass_enabled = true; This function is called from two places.
In ssl.c it is only called with an auth-token present or that
variable already set. The other one is init_query_passwords.

Move setting auth_user_pass_enabled to the second place to ensure it is
only set if we really want passwords.

Patch v2: Remove unrelated code change
Patch v3: Rebase to master
Patch v4: Rebase to master

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: David Sommerseth <davids@openvpn.net>
Acked-by: Heiko Hund <heiko@ist.eigentlich.net>
Message-Id: <20221009130805.1556517-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25367.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/init.c
src/openvpn/ssl.c
src/openvpn/ssl.h