{"thread":{"id":"47100","subject":"Git libsecret No Unlock Dialog Issue","startedAt":"2017-11-02T16:01:19Z","lastAt":"2017-11-06T09:54:05Z","messageCount":8,"participants":["Yaroslav Sapozhnyk","Stefan Beller","Dennis Kaarsemaker","Mantas Mikulėnas"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"331669","messageId":"CAOAxMp-vAM7mCWuanj69coM09zF-Sxe=G=-XMd_RmaAne8qFvw@mail.gmail.com","threadId":"47100","inReplyTo":null,"subject":"Git libsecret No Unlock Dialog Issue","fromName":"Yaroslav Sapozhnyk","fromEmail":"yaroslav.sapozhnik@gmail.com","sentAt":"2017-11-02T16:00:49Z","receivedAt":"2017-11-02T16:01:19Z","isPatch":false,"sender":{"key":"yaroslav.sapozhnik@gmail.com","avatar":null},"body":"When using Git on Fedora with locked password store\ncredential-libsecret asks for username/password instead of displaying\nthe unlock dialog.\n\nIf the store is unlocked credential helper gets the credentials from\nthe store though.\n\n-- \nRegards,\nYaroslav Sapozhnyk\n"},{"id":"331685","messageId":"CAGZ79kaDB+nnTZVw-7msVa12RQa3sHn_zFKQ2-5i2eosuHutxQ@mail.gmail.com","threadId":"47100","inReplyTo":"CAOAxMp-vAM7mCWuanj69coM09zF-Sxe=G=-XMd_RmaAne8qFvw@mail.gmail.com","subject":"Re: Git libsecret No Unlock Dialog Issue","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-11-02T18:35:49Z","receivedAt":"2017-11-02T18:35:56Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Thu, Nov 2, 2017 at 9:00 AM, Yaroslav Sapozhnyk\n<yaroslav.sapozhnik@gmail.com> wrote:\n> When using Git on Fedora with locked password store\n> credential-libsecret asks for username/password instead of displaying\n> the unlock dialog.\n\nGit as packaged by Fedora or upstream Git (which version)?\n\n> If the store is unlocked credential helper gets the credentials from\n> the store though.\n>\n> --\n> Regards,\n> Yaroslav Sapozhnyk\n"},{"id":"331687","messageId":"CAOAxMp9RGq-=QowPytsvE+Z5CgNW72FUhbtdCS35fBCMEvYYoA@mail.gmail.com","threadId":"47100","inReplyTo":"CAGZ79kaDB+nnTZVw-7msVa12RQa3sHn_zFKQ2-5i2eosuHutxQ@mail.gmail.com","subject":"Re: Git libsecret No Unlock Dialog Issue","fromName":"Yaroslav Sapozhnyk","fromEmail":"yaroslav.sapozhnik@gmail.com","sentAt":"2017-11-02T18:50:34Z","receivedAt":"2017-11-02T18:50:59Z","isPatch":false,"sender":{"key":"yaroslav.sapozhnik@gmail.com","avatar":null},"body":"Sorry, should have mentioned that. It's packaged by Fedora - 2.13.6.\n\nYaroslav\n\nOn Thu, Nov 2, 2017 at 2:35 PM, Stefan Beller <sbeller@google.com> wrote:\n> On Thu, Nov 2, 2017 at 9:00 AM, Yaroslav Sapozhnyk\n> <yaroslav.sapozhnik@gmail.com> wrote:\n>> When using Git on Fedora with locked password store\n>> credential-libsecret asks for username/password instead of displaying\n>> the unlock dialog.\n>\n> Git as packaged by Fedora or upstream Git (which version)?\n>\n>> If the store is unlocked credential helper gets the credentials from\n>> the store though.\n>>\n>> --\n>> Regards,\n>> Yaroslav Sapozhnyk\n\n\n\n-- \nRegards,\nYaroslav Sapozhnyk\n"},{"id":"331688","messageId":"1509648929.1838.1.camel@kaarsemaker.net","threadId":"47100","inReplyTo":"CAGZ79kaDB+nnTZVw-7msVa12RQa3sHn_zFKQ2-5i2eosuHutxQ@mail.gmail.com","subject":"Re: Git libsecret No Unlock Dialog Issue","fromName":"Dennis Kaarsemaker","fromEmail":"dennis@kaarsemaker.net","sentAt":"2017-11-02T18:55:29Z","receivedAt":"2017-11-02T18:55:39Z","isPatch":false,"sender":{"key":"dennis@kaarsemaker.net","avatar":"https://avatars.githubusercontent.com/u/200649?v=4"},"body":"On Thu, 2017-11-02 at 11:35 -0700, Stefan Beller wrote:\n> On Thu, Nov 2, 2017 at 9:00 AM, Yaroslav Sapozhnyk\n> <yaroslav.sapozhnik@gmail.com> wrote:\n> > When using Git on Fedora with locked password store\n> > credential-libsecret asks for username/password instead of displaying\n> > the unlock dialog.\n> \n> Git as packaged by Fedora or upstream Git (which version)?\n\nLooking at the code: current upstream git. Looking at the documentation\nfor libsecret, this should fix it. I've not been able to test it\nthough.\n\ndiff --git a/contrib/credential/libsecret/git-credential-libsecret.c b/contrib/credential/libsecret/git-credential-libsecret.c\nindex 4c56979d8a..b4750c9ee8 100644\n--- a/contrib/credential/libsecret/git-credential-libsecret.c\n+++ b/contrib/credential/libsecret/git-credential-libsecret.c\n@@ -104,7 +104,7 @@ static int keyring_get(struct credential *c)\n        items = secret_service_search_sync(service,\n                                           SECRET_SCHEMA_COMPAT_NETWORK,\n                                           attributes,\n-                                          SECRET_SEARCH_LOAD_SECRETS,\n+                                          SECRET_SEARCH_LOAD_SECRETS | SECRET_SEARCH_UNLOCK,\n                                           NULL,\n                                           &error);\n        g_hash_table_unref(attributes);\n"},{"id":"331699","messageId":"CAOAxMp9H6M+t5RvYiem+kXrY920ZDYvyyYt4GZ7ZnkpXVA_c0g@mail.gmail.com","threadId":"47100","inReplyTo":"1509648929.1838.1.camel@kaarsemaker.net","subject":"Re: Git libsecret No Unlock Dialog Issue","fromName":"Yaroslav Sapozhnyk","fromEmail":"yaroslav.sapozhnik@gmail.com","sentAt":"2017-11-02T19:48:25Z","receivedAt":"2017-11-02T19:48:52Z","isPatch":false,"sender":{"key":"yaroslav.sapozhnik@gmail.com","avatar":null},"body":"I've tested the code change locally and seems like it fixes the issue.\n\nYaroslav\n\nOn Thu, Nov 2, 2017 at 2:55 PM, Dennis Kaarsemaker\n<dennis@kaarsemaker.net> wrote:\n> On Thu, 2017-11-02 at 11:35 -0700, Stefan Beller wrote:\n>> On Thu, Nov 2, 2017 at 9:00 AM, Yaroslav Sapozhnyk\n>> <yaroslav.sapozhnik@gmail.com> wrote:\n>> > When using Git on Fedora with locked password store\n>> > credential-libsecret asks for username/password instead of displaying\n>> > the unlock dialog.\n>>\n>> Git as packaged by Fedora or upstream Git (which version)?\n>\n> Looking at the code: current upstream git. Looking at the documentation\n> for libsecret, this should fix it. I've not been able to test it\n> though.\n>\n> diff --git a/contrib/credential/libsecret/git-credential-libsecret.c b/contrib/credential/libsecret/git-credential-libsecret.c\n> index 4c56979d8a..b4750c9ee8 100644\n> --- a/contrib/credential/libsecret/git-credential-libsecret.c\n> +++ b/contrib/credential/libsecret/git-credential-libsecret.c\n> @@ -104,7 +104,7 @@ static int keyring_get(struct credential *c)\n>         items = secret_service_search_sync(service,\n>                                            SECRET_SCHEMA_COMPAT_NETWORK,\n>                                            attributes,\n> -                                          SECRET_SEARCH_LOAD_SECRETS,\n> +                                          SECRET_SEARCH_LOAD_SECRETS | SECRET_SEARCH_UNLOCK,\n>                                            NULL,\n>                                            &error);\n>         g_hash_table_unref(attributes);\n\n\n\n-- \nRegards,\nYaroslav Sapozhnyk\n"},{"id":"331794","messageId":"CAOAxMp9fi3n=anfE_XCqDMtsr89pPANgCK1SL-RnOkwYjOM8hQ@mail.gmail.com","threadId":"47100","inReplyTo":"CAOAxMp9H6M+t5RvYiem+kXrY920ZDYvyyYt4GZ7ZnkpXVA_c0g@mail.gmail.com","subject":"Re: Git libsecret No Unlock Dialog Issue","fromName":"Yaroslav Sapozhnyk","fromEmail":"yaroslav.sapozhnik@gmail.com","sentAt":"2017-11-03T18:01:38Z","receivedAt":"2017-11-03T18:02:04Z","isPatch":false,"sender":{"key":"yaroslav.sapozhnik@gmail.com","avatar":null},"body":"What version should include this fix? Cannot find a pr for it.\n\nThanks for providing the fix!\n\nRegards,\nYaroslav\n\nOn Thu, Nov 2, 2017 at 3:48 PM, Yaroslav Sapozhnyk\n<yaroslav.sapozhnik@gmail.com> wrote:\n> I've tested the code change locally and seems like it fixes the issue.\n>\n> Yaroslav\n>\n> On Thu, Nov 2, 2017 at 2:55 PM, Dennis Kaarsemaker\n> <dennis@kaarsemaker.net> wrote:\n>> On Thu, 2017-11-02 at 11:35 -0700, Stefan Beller wrote:\n>>> On Thu, Nov 2, 2017 at 9:00 AM, Yaroslav Sapozhnyk\n>>> <yaroslav.sapozhnik@gmail.com> wrote:\n>>> > When using Git on Fedora with locked password store\n>>> > credential-libsecret asks for username/password instead of displaying\n>>> > the unlock dialog.\n>>>\n>>> Git as packaged by Fedora or upstream Git (which version)?\n>>\n>> Looking at the code: current upstream git. Looking at the documentation\n>> for libsecret, this should fix it. I've not been able to test it\n>> though.\n>>\n>> diff --git a/contrib/credential/libsecret/git-credential-libsecret.c b/contrib/credential/libsecret/git-credential-libsecret.c\n>> index 4c56979d8a..b4750c9ee8 100644\n>> --- a/contrib/credential/libsecret/git-credential-libsecret.c\n>> +++ b/contrib/credential/libsecret/git-credential-libsecret.c\n>> @@ -104,7 +104,7 @@ static int keyring_get(struct credential *c)\n>>         items = secret_service_search_sync(service,\n>>                                            SECRET_SCHEMA_COMPAT_NETWORK,\n>>                                            attributes,\n>> -                                          SECRET_SEARCH_LOAD_SECRETS,\n>> +                                          SECRET_SEARCH_LOAD_SECRETS | SECRET_SEARCH_UNLOCK,\n>>                                            NULL,\n>>                                            &error);\n>>         g_hash_table_unref(attributes);\n>\n>\n>\n> --\n> Regards,\n> Yaroslav Sapozhnyk\n\n\n\n-- \nRegards,\nYaroslav Sapozhnyk\n"},{"id":"331806","messageId":"20171103204449.5268-1-dennis@kaarsemaker.net","threadId":"47100","inReplyTo":"CAOAxMp9H6M+t5RvYiem+kXrY920ZDYvyyYt4GZ7ZnkpXVA_c0g@mail.gmail.com","subject":"[PATCH] credential-libsecret: unlock locked secrets","fromName":"Dennis Kaarsemaker","fromEmail":"dennis@kaarsemaker.net","sentAt":"2017-11-03T20:44:49Z","receivedAt":"2017-11-03T20:50:56Z","isPatch":true,"sender":{"key":"dennis@kaarsemaker.net","avatar":"https://avatars.githubusercontent.com/u/200649?v=4"},"body":"Credentials exposed by the secret service DBUS interface may be locked.\nSetting the SECRET_SEARCH_UNLOCK flag will make the secret service\nunlock these secrets, possibly prompting the user for credentials to do\nso. Without this flag, the secret is simply not loaded.\n\nSigned-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>\n---\n contrib/credential/libsecret/git-credential-libsecret.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/contrib/credential/libsecret/git-credential-libsecret.c b/contrib/credential/libsecret/git-credential-libsecret.c\nindex 4c56979d8a..b4750c9ee8 100644\n--- a/contrib/credential/libsecret/git-credential-libsecret.c\n+++ b/contrib/credential/libsecret/git-credential-libsecret.c\n@@ -104,7 +104,7 @@ static int keyring_get(struct credential *c)\n \titems = secret_service_search_sync(service,\n \t\t\t\t\t   SECRET_SCHEMA_COMPAT_NETWORK,\n \t\t\t\t\t   attributes,\n-\t\t\t\t\t   SECRET_SEARCH_LOAD_SECRETS,\n+\t\t\t\t\t   SECRET_SEARCH_LOAD_SECRETS | SECRET_SEARCH_UNLOCK,\n \t\t\t\t\t   NULL,\n \t\t\t\t\t   &error);\n \tg_hash_table_unref(attributes);\n-- \n2.15.0-rc2-464-gb5de734\n\n"},{"id":"331912","messageId":"CAPWNY8WUo8n903AcUPQ-EsfmtjoKRJDGXp0Wy4KoBSbrOhrR0A@mail.gmail.com","threadId":"47100","inReplyTo":"20171103204449.5268-1-dennis@kaarsemaker.net","subject":"Re: [PATCH] credential-libsecret: unlock locked secrets","fromName":"Mantas Mikulėnas","fromEmail":"grawity@gmail.com","sentAt":"2017-11-06T09:53:42Z","receivedAt":"2017-11-06T09:54:05Z","isPatch":true,"sender":{"key":"grawity@gmail.com","avatar":"https://avatars.githubusercontent.com/u/31021?v=4"},"body":"On Fri, Nov 3, 2017 at 10:44 PM, Dennis Kaarsemaker\n<dennis@kaarsemaker.net> wrote:\n> Credentials exposed by the secret service DBUS interface may be locked.\n> Setting the SECRET_SEARCH_UNLOCK flag will make the secret service\n> unlock these secrets, possibly prompting the user for credentials to do\n> so. Without this flag, the secret is simply not loaded.\n>\n> Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>\n> ---\n>  contrib/credential/libsecret/git-credential-libsecret.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/contrib/credential/libsecret/git-credential-libsecret.c b/contrib/credential/libsecret/git-credential-libsecret.c\n> index 4c56979d8a..b4750c9ee8 100644\n> --- a/contrib/credential/libsecret/git-credential-libsecret.c\n> +++ b/contrib/credential/libsecret/git-credential-libsecret.c\n> @@ -104,7 +104,7 @@ static int keyring_get(struct credential *c)\n>         items = secret_service_search_sync(service,\n>                                            SECRET_SCHEMA_COMPAT_NETWORK,\n>                                            attributes,\n> -                                          SECRET_SEARCH_LOAD_SECRETS,\n> +                                          SECRET_SEARCH_LOAD_SECRETS | SECRET_SEARCH_UNLOCK,\n>                                            NULL,\n>                                            &error);\n>         g_hash_table_unref(attributes);\n> --\n> 2.15.0-rc2-464-gb5de734\n>\n\nLooks okay. (It seems that's what all other programs do, too...)\n\n-- \nMantas Mikulėnas <grawity@gmail.com>\n"}]}