mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 20:40:06 +01:00
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:
parent
e9b7ecef53
commit
043ce2c655
1 changed files with 8 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue