[network-manager-openvpn] core: fix handling of auth request in non-interactive mode
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn] core: fix handling of auth request in non-interactive mode
- Date: Mon, 6 Jan 2014 23:21:14 +0000 (UTC)
commit c55dbaefeb9fef1c288e1ee92c2d6889142a32cd
Author: Dan Williams <dcbw redhat com>
Date: Mon Jan 6 17:07:01 2014 -0600
core: fix handling of auth request in non-interactive mode
Further input is only required if handle_auth() returns a message
from openvpn. The non-interactive code always assumed that further
authentication was required, and failed the connection.
src/nm-openvpn-service.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 8589b57..66f2118 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -515,20 +515,20 @@ handle_management_socket (NMVPNPlugin *plugin,
if (handle_auth (priv->io_data, auth, &message, &hints)) {
/* Request new secrets if we need any */
- if (priv->interactive) {
- if (message) {
+ if (message) {
+ if (priv->interactive) {
if (debug) {
char *joined = hints ? g_strjoinv (",", (char **) hints) :
"none";
g_message ("Requesting new secrets: '%s' (%s)", message,
joined);
g_free (joined);
}
nm_vpn_plugin_secrets_required (plugin, message, (const char **)
hints);
+ } else {
+ /* Interactive not allowed, can't ask for more secrets */
+ g_warning ("More secrets required but cannot ask interactively");
+ *out_failure = NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED;
+ again = FALSE;
}
- } else {
- /* Interactive not allowed, can't ask for more secrets */
- g_warning ("More secrets required but cannot ask interactively");
- *out_failure = NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED;
- again = FALSE;
}
if (hints)
g_free (hints); /* elements are 'const' */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]