summaryrefslogtreecommitdiff
path: root/libnm-util/nm-connection.h
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2011-08-16 16:19:23 -0500
committerDan Williams <dcbw@redhat.com>2011-08-16 16:19:23 -0500
commit2b2404bbef00abf247f1246e146fc873a90a5265 (patch)
tree3e3adaa1358931f522de3007649b004ef3f1cce5 /libnm-util/nm-connection.h
parente2d88f59e6b95edfbd0b5ae7e7e396e8ab462664 (diff)
downloadNetworkManager-2b2404bbef00abf247f1246e146fc873a90a5265.tar.gz
settings: preserve agent secrets the right way
What we want to do here is keep separate caches of system and agent secrets. For system secrets, we cache them because NM periodically clears secrets using nm_connection_clear_secrets() to ensure they don't stay around in memory, and that transient secrets get requested again when they are needed. For agent secrets, we only want them during activation, but a connection read from disk will not include agent secrets becuase by definition they aren't stored in system settings along with the connection. Thus we need to keep the agent/transient secrets somewhere for the duration of the activation to ensure they don't get deleted. This removes the copy-back hack in update_auth_cb() which copied agent/transient secrets back into the connection over top of the transient secrets that had been copied back in nm_settings_connection_replace_settings(). No reason to copy them twice if we keep an agent/transient secrets hash and do the right thing with it.
Diffstat (limited to 'libnm-util/nm-connection.h')
-rw-r--r--libnm-util/nm-connection.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libnm-util/nm-connection.h b/libnm-util/nm-connection.h
index a7e0721cc1..ed68ac3457 100644
--- a/libnm-util/nm-connection.h
+++ b/libnm-util/nm-connection.h
@@ -147,6 +147,10 @@ const char * nm_connection_need_secrets (NMConnection *connection,
void nm_connection_clear_secrets (NMConnection *connection);
+void nm_connection_clear_secrets_with_flags (NMConnection *connection,
+ NMSettingClearSecretsWithFlagsFn func,
+ gpointer user_data);
+
gboolean nm_connection_update_secrets (NMConnection *connection,
const char *setting_name,
GHashTable *setting_secrets,