credential-libsecret: unlock locked secrets

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>

Dennis Kaarsemaker committed Nov 3, 2017 at 21:44 UTC 9c109e9bbcadb21cd6f955301f81583a74f8aa8c
1 file changed +1 -1
contrib/credential/libsecret/git-credential-libsecret.c
+1 -1
@@ -104,7 +104,7 @@ static int keyring_get(struct credential *c)
104 items = secret_service_search_sync(service,
105 SECRET_SCHEMA_COMPAT_NETWORK,
106 attributes,
107 - SECRET_SEARCH_LOAD_SECRETS,
107 + SECRET_SEARCH_LOAD_SECRETS | SECRET_SEARCH_UNLOCK,
108 NULL,
109 &error);
110 g_hash_table_unref(attributes);