summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2018-06-19 19:56:40 +0200
committerLubomir Rintel <lkundrak@v3.sk>2018-06-19 19:56:40 +0200
commit9a1863d5c869da16e0595deb1921d8effc6842e3 (patch)
treea71cade61e173fdee23ef9f237c803fe3d32a106
parent4ca5648260ac3161a698a16d16f8390ac9d1083d (diff)
parentecdf70874594e46638baaf1258cf2e9ff0b66a49 (diff)
downloadnetwork-manager-applet-9a1863d5c869da16e0595deb1921d8effc6842e3.tar.gz
merge: branch 'lr/no-keyring'
https://gitlab.gnome.org/GNOME/network-manager-applet/merge_requests/9
-rw-r--r--src/applet-agent.c5
-rw-r--r--src/applet.c6
2 files changed, 9 insertions, 2 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,
diff --git a/src/applet.c b/src/applet.c
index 17972945..1c489b6d 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -2866,8 +2866,10 @@ get_existing_secrets_cb (NMSecretAgentOld *agent,
NMADeviceClass *dclass;
GError *error = NULL;
- /* Merge existing secrets into connection; ignore errors */
- nm_connection_update_secrets (connection, req->setting_name, secrets, NULL);
+ if (secrets)
+ nm_connection_update_secrets (connection, req->setting_name, secrets, NULL);
+ else
+ nm_connection_clear_secrets (connection);
dclass = get_device_class_from_connection (connection, req->applet);
g_assert (dclass);