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



commit 9d9e989be49cf708f5e4f896c2ba3395eac07207
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date:   Wed Jul 21 16:28:35 2021 +0200

    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 #316

 src/calls-secret-store.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/calls-secret-store.c b/src/calls-secret-store.c
index 802e550d..5e7a63ac 100644
--- a/src/calls-secret-store.c
+++ b/src/calls-secret-store.c
@@ -32,7 +32,12 @@ const SecretSchema *
 calls_secret_get_schema (void)
 {
   static const SecretSchema schema = {
-    "sm.puri.Calls", 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.Calls", SECRET_SCHEMA_DONT_MATCH_NAME,
     {
       { CALLS_USERNAME_ATTRIBUTE, SECRET_SCHEMA_ATTRIBUTE_STRING },
       { CALLS_SERVER_ATTRIBUTE, SECRET_SCHEMA_ATTRIBUTE_STRING },


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]