Commit 8fb3173c authored by Evangelos Ribeiro Tzaras's avatar Evangelos Ribeiro Tzaras
Browse files

secret-store: Work around bug in gnome-keyring preventing keyring unlocking

When a keyring is cold (unlocked) the schema is set as
"org.freedesktop.Secret.Generic". If we require the name to strictly match
while searching we won't ever get a match.

See https://gitlab.gnome.org/GNOME/gnome-keyring/-/issues/89 and
https://gitlab.gnome.org/GNOME/libsecret/-/issues/7 for more information.

Closes #512
parent 7471b957
......@@ -26,7 +26,12 @@ static const SecretSchema *
secret_store_get_schema (void)
{
static const SecretSchema password_schema = {
"sm.puri.Chatty", SECRET_SCHEMA_NONE,
/** SECRET_SCHEMA_DONT_MATCH_NAME is used as a workaround for a bug in gnome-keyring
* which prevents cold keyrings from being searched (and hence does not prompt for unlocking)
* see https://gitlab.gnome.org/GNOME/gnome-keyring/-/issues/89 and
* https://gitlab.gnome.org/GNOME/libsecret/-/issues/7 for more information
*/
"sm.puri.Chatty", SECRET_SCHEMA_DONT_MATCH_NAME,
{
{ CHATTY_USERNAME_ATTRIBUTE, SECRET_SCHEMA_ATTRIBUTE_STRING },
{ CHATTY_SERVER_ATTRIBUTE, SECRET_SCHEMA_ATTRIBUTE_STRING },
......
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