The code that reads the challenge response (both dynamic & static) will
not prompt the user if the username and password information was read
from a file.  In the latest code this can be fixed by simply removing
the "if (username_from_stdin || password_from_stdin)" condition because
all the deeper code is already conditionalized adequately to only prompt
for the missing information.

NOTE: indentation left too deep so that changes are clearly seen.
---
 src/openvpn/misc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/openvpn/misc.c b/src/openvpn/misc.c
index 05ed073..a9259f0 100644
--- a/src/openvpn/misc.c
+++ b/src/openvpn/misc.c
@@ -1141,8 +1141,6 @@ get_user_pass_cr (struct user_pass *up,
       /*
        * Get username/password from standard input?
        */
-      if (username_from_stdin || password_from_stdin)
-       {
 #ifdef ENABLE_CLIENT_CR
          if (auth_challenge && (flags & GET_USER_PASS_DYNAMIC_CHALLENGE))
            {
@@ -1206,7 +1204,6 @@ get_user_pass_cr (struct user_pass *up,
                }
 #endif
            }
-       }

       string_mod (up->username, CC_PRINT, CC_CRLF, 0);
       string_mod (up->password, CC_PRINT, CC_CRLF, 0);
-- 
1.9.1


Reply via email to