[network-manager-applet/rm-userset] applet: only ask the user for secrets if the agent is allowed to
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/rm-userset] applet: only ask the user for secrets if the agent is allowed to
- Date: Thu, 20 Jan 2011 06:18:02 +0000 (UTC)
commit 2eef72b617130860095677c025a6d3733439b696
Author: Dan Williams <dcbw redhat com>
Date: Wed Jan 19 18:17:01 2011 -0600
applet: only ask the user for secrets if the agent is allowed to
If the request's flags didn't allow interaction, don't allow
interaction.
src/applet-agent.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/applet-agent.c b/src/applet-agent.c
index 4cb908c..da4500c 100644
--- a/src/applet-agent.c
+++ b/src/applet-agent.c
@@ -308,7 +308,8 @@ keyring_find_secrets_cb (GnomeKeyringResult result,
goto done;
}
- if (g_list_length (list) == 0) {
+ /* 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) {
g_message ("No keyring secrets found for %s/%s; asking user.", connection_id, r->setting_name);
ask_for_secrets (r);
return;
@@ -344,7 +345,7 @@ keyring_find_secrets_cb (GnomeKeyringResult result,
/* If there were hints, and none of the hints were returned by the keyring,
* get some new secrets.
*/
- if (r->hints && r->hints[0] && !hint_found) {
+ if (r->flags && r->hints && r->hints[0] && !hint_found) {
g_hash_table_destroy (secrets);
ask_for_secrets (r);
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]