diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2013-02-13 17:28:57 +0200 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-02-19 12:51:34 +0200 |
commit | 147ae125eef50c4bc37a0dea630a3ffde77211e3 (patch) | |
tree | 1244fb15ced3429b3b863ff82deae3253f886713 /vpn | |
parent | 6edb1ddf1f7abe0f397b14ecd45a44c9cc07cde7 (diff) | |
download | connman-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.c | 8 |
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; |