From bc9803f92d5e4d7f93f0f7d480ee85c2ff28511a Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 29 Mar 2011 22:56:08 -0500 Subject: [PATCH] settings: fix requesting new secrets when the old ones don't work If the connection had system secrets, previously the settings core would consider those sufficient even if the device code had requested new secrets because the old ones didn't work. --- src/settings/nm-agent-manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/settings/nm-agent-manager.c b/src/settings/nm-agent-manager.c index d403a6c6de..aae6f85b8d 100644 --- a/src/settings/nm-agent-manager.c +++ b/src/settings/nm-agent-manager.c @@ -903,6 +903,7 @@ get_start (gpointer user_data) if (setting_secrets && g_hash_table_size (setting_secrets)) { NMConnection *tmp; GError *error = NULL; + gboolean request_new = (req->flags & NM_SETTINGS_GET_SECRETS_FLAG_REQUEST_NEW); /* The connection already had secrets; check if any more are required. * If no more are required, we're done. If secrets are still needed, @@ -918,7 +919,7 @@ get_start (gpointer user_data) } else { /* Do we have everything we need? */ /* FIXME: handle second check for VPN connections */ - if (nm_connection_need_secrets (tmp, NULL) == NULL) { + if ((nm_connection_need_secrets (tmp, NULL) == NULL) && (request_new == FALSE)) { nm_log_dbg (LOGD_AGENTS, "(%p/%s) system settings secrets sufficient", req, req->setting_name);