[Openvpn-devel,v1] Fixup: prompting password from management

Message ID 20260424161840.5767-1-gert@greenie.muc.de
State New
Headers show
Series [Openvpn-devel,v1] Fixup: prompting password from management | expand

Commit Message

Gert Doering April 24, 2026, 4:18 p.m. UTC
From: Selva Nair <selva.nair@gmail.com>

Commit b450414 added logic for reading password from management
when not in file or inline, but it was made conditional on
`response_from_stdin` which is always true! Fix by explicitly
checking for `password_from_stdin`.

Change-Id: I4d46c3672691b159cbd98a17020c4f30782bc202
Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1638
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1638
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <gert@greenie.muc.de>

Patch

diff --git a/src/openvpn/misc.c b/src/openvpn/misc.c
index 979293f..10bfc35 100644
--- a/src/openvpn/misc.c
+++ b/src/openvpn/misc.c
@@ -336,6 +336,7 @@ 
              */
             if (management && (flags & GET_USER_PASS_MANAGEMENT)
                 && management_query_user_pass_enabled(management)
+                && password_from_stdin
                 && !(flags & GET_USER_PASS_USERNAME_ONLY))
             {
                 msg(D_LOW,