From db653221c8fe867f05b5e05d47d07fe1e0e6e22a Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Wed, 13 Feb 2013 17:28:58 +0200 Subject: l2tp: Clear password if authentication fails This allows plugin to query agent so that user can give correct password. --- vpn/plugins/l2tp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'vpn/plugins') diff --git a/vpn/plugins/l2tp.c b/vpn/plugins/l2tp.c index e0b2b04f..0a7ebf11 100644 --- a/vpn/plugins/l2tp.c +++ b/vpn/plugins/l2tp.c @@ -174,8 +174,14 @@ static int l2tp_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, "L2TP.User", NULL); + vpn_provider_set_string(provider, "L2TP.Password", NULL); + return VPN_STATE_AUTH_FAILURE; + } if (strcmp(reason, "connect")) return VPN_STATE_DISCONNECT; -- cgit v1.2.3