summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2009-10-08 23:00:01 -0700
committerDan Williams <dcbw@redhat.com>2009-10-08 23:00:01 -0700
commitbc653d222519965e552736b0ab30dc1b40539152 (patch)
treea6a4ab53df4f677012ed176b3e7686de8a4ee046
parentc31b3e455414a5a7bf57d9fed1442367e9e4c917 (diff)
vpn: clear secrets when the connection fails
NM previously only cleared secrets when the VPN service daemon quit, and the service daemons are on a 10-second inactivity timer. So if the user tried to re-activate the failed VPN connection within 10 seconds the old secrets would get used, which clearly isn't what we want. Ensure that whenever the VPN connection fails or disconnects, we ask the settings service for secrets again the next time.
-rw-r--r--src/vpn-manager/nm-vpn-connection.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
index a89c7101f7..f8360dc669 100644
--- a/src/vpn-manager/nm-vpn-connection.c
+++ b/src/vpn-manager/nm-vpn-connection.c
@@ -912,6 +912,12 @@ vpn_cleanup (NMVPNConnection *connection)
g_free (priv->tundev);
priv->tundev = NULL;
}
+
+ /* Clear out connection secrets to ensure that the settings service
+ * gets asked for them next time the connection is activated.
+ */
+ if (priv->connection)
+ nm_connection_clear_secrets (priv->connection);
}
static void