From 3cf6c9328250061600b78c8a7deb0edc850e739b Mon Sep 17 00:00:00 2001 From: James Yonan Date: Mon, 24 May 2010 22:51:16 +0000 Subject: Implemented http-proxy-override and http-proxy-fallback directives to make it easier for OpenVPN client UIs to start a pre-existing client config file with proxy options, or to adaptively fall back to a proxy connection if a direct connection fails. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5652 e7ae566f-a301-0410-adde-c780ea21d3b5 --- misc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'misc.c') diff --git a/misc.c b/misc.c index 3792476..507bcc2 100644 --- a/misc.c +++ b/misc.c @@ -1374,6 +1374,9 @@ get_user_pass (struct user_pass *up, { const bool from_stdin = (!auth_file || !strcmp (auth_file, "stdin")); + if (flags & GET_USER_PASS_PREVIOUS_CREDS_FAILED) + msg (M_WARN, "Note: previous '%s' credentials failed", prefix); + #ifdef ENABLE_MANAGEMENT /* * Get username/password from standard input? @@ -1382,6 +1385,9 @@ get_user_pass (struct user_pass *up, && ((auth_file && streq (auth_file, "management")) || (from_stdin && (flags & GET_USER_PASS_MANAGEMENT))) && management_query_user_pass_enabled (management)) { + if (flags & GET_USER_PASS_PREVIOUS_CREDS_FAILED) + management_auth_failure (management, prefix, "previous auth credentials failed"); + if (!management_query_user_pass (management, up, prefix, flags)) { if ((flags & GET_USER_PASS_NOFATAL) != 0) -- cgit