From 147ae125eef50c4bc37a0dea630a3ffde77211e3 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Wed, 13 Feb 2013 17:28:57 +0200 Subject: [PATCH] pptp: Clear password if authentication fails This allows plugin to query agent so that user can give new password. Fixes BMC#25963 --- vpn/plugins/pptp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vpn/plugins/pptp.c b/vpn/plugins/pptp.c index daa6ca3..0e6b07a 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; -- 2.7.4