Commit 869b5c6d authored by Daiki Ueno's avatar Daiki Ueno

ssh-agent: Use the same parameters for accessing login keyring

When looking up a secret in the login keyring, do not supply any
schema in the criteria, while using "org.freedesktop.Secret.Generic"
as schema when storing it.  This is for backward compatibility with
gnome-keyring 2.29, which used "org.gnome.keyring.EncryptionKey" as
schema.

In addtion, use the same label for the newly stored passwords as
before.

https://bugzilla.gnome.org/show_bug.cgi?id=794368
parent 0a003f02
......@@ -246,13 +246,14 @@ ensure_key (GkdSshAgentService *self,
argv[1] = info->filename;
fields = g_hash_table_new (g_str_hash, g_str_equal);
g_hash_table_insert (fields, "xdg:schema", "org.freedesktop.Secret.Generic");
unique = g_strdup_printf ("ssh-store:%s", info->filename);
g_hash_table_insert (fields, "unique", unique);
label = info->comment[0] != '\0' ? info->comment : _("Unnamed");
label = g_strdup_printf (_("Unlock password for: %s"),
info->comment[0] != '\0' ? info->comment : _("Unnamed"));
interaction = gkd_login_interaction_new (self->interaction, NULL, label, fields);
g_free (label);
askpass = gcr_ssh_askpass_new (interaction);
g_object_unref (interaction);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment