OSDN Git Service

credential-libsecret: unlock locked secrets
authorDennis Kaarsemaker <dennis@kaarsemaker.net>
Fri, 3 Nov 2017 20:44:49 +0000 (21:44 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 4 Nov 2017 01:59:21 +0000 (10:59 +0900)
Credentials exposed by the secret service DBUS interface may be locked.
Setting the SECRET_SEARCH_UNLOCK flag will make the secret service
unlock these secrets, possibly prompting the user for credentials to do
so. Without this flag, the secret is simply not loaded.

Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/credential/libsecret/git-credential-libsecret.c

index 4c56979..b4750c9 100644 (file)
@@ -104,7 +104,7 @@ static int keyring_get(struct credential *c)
        items = secret_service_search_sync(service,
                                           SECRET_SCHEMA_COMPAT_NETWORK,
                                           attributes,
-                                          SECRET_SEARCH_LOAD_SECRETS,
+                                          SECRET_SEARCH_LOAD_SECRETS | SECRET_SEARCH_UNLOCK,
                                           NULL,
                                           &error);
        g_hash_table_unref(attributes);