summaryrefslogtreecommitdiff
path: root/vpn
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-02-13 17:28:57 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-02-19 12:51:34 +0200
commit147ae125eef50c4bc37a0dea630a3ffde77211e3 (patch)
tree1244fb15ced3429b3b863ff82deae3253f886713 /vpn
parent6edb1ddf1f7abe0f397b14ecd45a44c9cc07cde7 (diff)
downloadconnman-147ae125eef50c4bc37a0dea630a3ffde77211e3.tar.gz
connman-147ae125eef50c4bc37a0dea630a3ffde77211e3.tar.bz2
connman-147ae125eef50c4bc37a0dea630a3ffde77211e3.zip
pptp: Clear password if authentication fails
This allows plugin to query agent so that user can give new password. Fixes BMC#25963
Diffstat (limited to 'vpn')
-rw-r--r--vpn/plugins/pptp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/vpn/plugins/pptp.c b/vpn/plugins/pptp.c
index daa6ca35..0e6b07a7 100644
--- a/vpn/plugins/pptp.c
+++ b/vpn/plugins/pptp.c
@@ -133,8 +133,14 @@ static int pptp_notify(DBusMessage *msg, struct vpn_provider *provider)
return VPN_STATE_FAILURE;
}
- if (strcmp(reason, "auth failed") == 0)
+ if (strcmp(reason, "auth failed") == 0) {
+ DBG("authentication failure");
+
+ vpn_provider_set_string(provider, "PPTP.User", NULL);
+ vpn_provider_set_string(provider, "PPTP.Password", NULL);
+
return VPN_STATE_AUTH_FAILURE;
+ }
if (strcmp(reason, "connect"))
return VPN_STATE_DISCONNECT;