File nm-treat-not-saved-secrets-just-like-agent-owned-when-cl.diff of Package NetworkManager

From b4ccaf268f1c32d09df8f678dcf4c296f9b2b213 Mon Sep 17 00:00:00 2001
From: Ludwig Nussel <ludwig.nussel@suse.de>
Date: Tue, 27 Sep 2011 12:34:11 +0200
Subject: [PATCH 2/3] treat not saved secrets just like agent owned when cleaning

---
 src/settings/nm-settings-connection.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Index: NetworkManager-0.9.8.0/src/settings/nm-settings-connection.c
===================================================================
--- NetworkManager-0.9.8.0.orig/src/settings/nm-settings-connection.c
+++ NetworkManager-0.9.8.0/src/settings/nm-settings-connection.c
@@ -592,7 +592,7 @@ clear_nonagent_secrets (GHashTableIter *
                         NMSettingSecretFlags flags,
                         gpointer user_data)
 {
-	if (flags != NM_SETTING_SECRET_FLAG_AGENT_OWNED)
+	if (!(flags & (NM_SETTING_SECRET_FLAG_AGENT_OWNED | NM_SETTING_SECRET_FLAG_NOT_SAVED)))
 		g_hash_table_iter_remove (iter);
 	return TRUE;
 }