[network-manager-applet] applet: only request secrets via UI when allowed to
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] applet: only request secrets via UI when allowed to
- Date: Wed, 3 Apr 2013 20:30:34 +0000 (UTC)
commit 00c312ac84d02c1e67cccfb4707f53326ee7c69c
Author: Dan Williams <dcbw redhat com>
Date: Wed Apr 3 15:30:25 2013 -0500
applet: only request secrets via UI when allowed to
The user should only be presented with UI to enter secrets when
NetworkManager sets the ALLOW_INTERACTION flag in the secrets
request to the agent. Otherwise, a connection editor requesting
existing secrets for display in its UI, for a connection which
doesn't have any secrets yet, could trigger the applet's secrets
dialog.
src/applet-agent.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/applet-agent.c b/src/applet-agent.c
index 4afb2a7..6b15ec7 100644
--- a/src/applet-agent.c
+++ b/src/applet-agent.c
@@ -340,8 +340,12 @@ keyring_find_secrets_cb (GObject *source,
goto done;
}
- /* Only ask if we're allowed to, ie if flags != NM_SECRET_AGENT_GET_SECRETS_FLAG_NONE */
- if (r->flags && g_list_length (list) == 0) {
+ /* Only ask if we're allowed to, so that eg a connection editor which
+ * requests secrets for its UI, for a connection which doesn't have any
+ * secrets yet, doesn't trigger the applet secrets dialog.
+ */
+ if ( (r->flags & NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION)
+ && g_list_length (list) == 0) {
g_message ("No keyring secrets found for %s/%s; asking user.", connection_id,
r->setting_name);
ask_for_secrets (r);
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]