diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2018-06-07 21:01:17 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2018-06-07 21:01:17 +0200 |
commit | ecdf70874594e46638baaf1258cf2e9ff0b66a49 (patch) | |
tree | a71cade61e173fdee23ef9f237c803fe3d32a106 | |
parent | fe74f80d49a3063ddba97a5a024ab85ed217e02d (diff) | |
download | network-manager-applet-ecdf70874594e46638baaf1258cf2e9ff0b66a49.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.c | 5 |
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, |