summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2018-06-07 21:01:17 +0200
committerLubomir Rintel <lkundrak@v3.sk>2018-06-07 21:01:17 +0200
commitecdf70874594e46638baaf1258cf2e9ff0b66a49 (patch)
treea71cade61e173fdee23ef9f237c803fe3d32a106
parentfe74f80d49a3063ddba97a5a024ab85ed217e02d (diff)
downloadnetwork-manager-applet-lr/no-keyring.tar.gz
applet-agent: tolerate keyring not being there for interactive requestslr/no-keyring
This is essentially an usability thing that allows system-owned secrets to be used even when GNOME keyring is not installed. https://gitlab.gnome.org/GNOME/network-manager-applet/issues/3
-rw-r--r--src/applet-agent.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/applet-agent.c b/src/applet-agent.c
index b95075e2..f663eea5 100644
--- a/src/applet-agent.c
+++ b/src/applet-agent.c
@@ -299,6 +299,11 @@ keyring_find_secrets_cb (GObject *source,
"The secrets request was canceled by the user");
g_error_free (search_error);
goto done;
+ } else if ( (r->flags & NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION)
+ && g_error_matches (search_error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN)) {
+ /* If the connection always asks for secrets, tolerate
+ * keyring service not being present. */
+ g_clear_error (&search_error);
} else if (search_error) {
error = g_error_new (NM_SECRET_AGENT_ERROR,
NM_SECRET_AGENT_ERROR_FAILED,