aboutsummaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-11-01 00:07:21 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-11-01 00:07:21 +0000
commit1d89886e00a36788cf16d1c5de9cca224074edcf (patch)
tree4a377c091d927368dcde5678f8e6157aca333f03 /misc.c
parentVersion 2.1_beta16 released (diff)
downloadopenvpn-1d89886e00a36788cf16d1c5de9cca224074edcf.tar.xz
Merged Alon's branch:v2.1_rc1
svn merge -r1322:1392 https://svn.openvpn.net/projects/openvpn/contrib/alon/21rc/openvpn . Version 2.1_rc1 released git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1420 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/misc.c b/misc.c
index 0c45817..fb18448 100644
--- a/misc.c
+++ b/misc.c
@@ -1173,7 +1173,7 @@ get_console_input (const char *prompt, const bool echo, char *input, const int c
* Get and store a username/password
*/
-void
+bool
get_user_pass (struct user_pass *up,
const char *auth_file,
const char *prefix,
@@ -1194,7 +1194,12 @@ get_user_pass (struct user_pass *up,
&& management_query_user_pass_enabled (management))
{
if (!management_query_user_pass (management, up, prefix, flags))
- msg (M_FATAL, "ERROR: could not read %s username/password/ok from management interface", prefix);
+ {
+ if ((flags & GET_USER_PASS_NOFATAL) != 0)
+ return false;
+ else
+ msg (M_FATAL, "ERROR: could not read %s username/password/ok from management interface", prefix);
+ }
}
else
#endif
@@ -1294,6 +1299,8 @@ get_user_pass (struct user_pass *up,
#endif
gc_free (&gc);
+
+ return true;
}
void