core: clear secrets on successful connection too

This ensures that the next time secrets are required, they will
be requested from the settings service.  Internally, NM shouldn't
be caching secrets; it should always request them from the settings
service so that the settings service can enforce policy about
password lifetime, if it wants to.
This commit is contained in:
Dan Williams 2010-04-06 12:48:53 -07:00
parent e9b7ecef53
commit 043ce2c655

View file

@ -803,10 +803,16 @@ device_state_changed (NMDevice *device,
schedule_activate_check (policy, device, 3);
break;
case NM_DEVICE_STATE_ACTIVATED:
/* Clear the invalid tag on the connection */
if (connection)
if (connection) {
/* Clear the invalid tag on the connection */
g_object_set_data (G_OBJECT (connection), INVALID_TAG, NULL);
/* And clear secrets so they will always be requested from the
* settings service when the next connection is made.
*/
nm_connection_clear_secrets (connection);
}
update_routing_and_dns (policy, FALSE);
break;
case NM_DEVICE_STATE_UNMANAGED: