unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#29665: 26.0.90; auth-source-pass decrypts entries 3 times on query
@ 2017-12-11 20:23 John Wiegley
  2019-07-14 18:19 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: John Wiegley @ 2017-12-11 20:23 UTC (permalink / raw)
  To: 29665

I've enabled auth-source-pass on my system as follows:

  (use-package auth-source-pass
    :config
    (auth-source-pass-enable)
  
    (defun auth-source-pass--read-entry (entry)
      "Return a string with the file content of ENTRY."
      (with-temp-buffer
        (insert-file-contents (expand-file-name
                               (format "%s.gpg" entry)
                               (getenv "PASSWORD_STORE_DIR")))
        (buffer-substring-no-properties (point-min) (point-max))))
  
    (defun auth-source-pass-entries ()
      "Return a list of all password store entries."
      (let ((store-dir (getenv "PASSWORD_STORE_DIR")))
        (mapcar
         (lambda (file) (file-name-sans-extension (file-relative-name file store-dir)))
         (directory-files-recursively store-dir "\.gpg$")))))

This works around the other bug I logged today. I have one file in my store:

  ~/doc/.passwords/reddit.com

It has a "login: jwiegley" field. I then run:

  (auth-source-search :host "reddit.com" :user "jwiegley")

After doing so, I can see it Decrypting the reddit.com.gpg file three times
before it shows me the data, even with `auth-source-do-cache' set to t.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#29665: 26.0.90; auth-source-pass decrypts entries 3 times on query
  2017-12-11 20:23 bug#29665: 26.0.90; auth-source-pass decrypts entries 3 times on query John Wiegley
@ 2019-07-14 18:19 ` Lars Ingebrigtsen
  2020-08-12  3:12   ` Stefan Kangas
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-14 18:19 UTC (permalink / raw)
  To: 29665; +Cc: John Wiegley

"John Wiegley" <johnw@gnu.org> writes:

> I've enabled auth-source-pass on my system as follows:
>
>   (use-package auth-source-pass
>     :config
>     (auth-source-pass-enable)
>   
>     (defun auth-source-pass--read-entry (entry)
>       "Return a string with the file content of ENTRY."
>       (with-temp-buffer
>         (insert-file-contents (expand-file-name
>                                (format "%s.gpg" entry)
>                                (getenv "PASSWORD_STORE_DIR")))
>         (buffer-substring-no-properties (point-min) (point-max))))
>   
>     (defun auth-source-pass-entries ()
>       "Return a list of all password store entries."
>       (let ((store-dir (getenv "PASSWORD_STORE_DIR")))
>         (mapcar
>          (lambda (file) (file-name-sans-extension (file-relative-name file store-dir)))
>          (directory-files-recursively store-dir "\.gpg$")))))
>
> This works around the other bug I logged today. I have one file in my store:
>
>   ~/doc/.passwords/reddit.com
>
> It has a "login: jwiegley" field. I then run:
>
>   (auth-source-search :host "reddit.com" :user "jwiegley")
>
> After doing so, I can see it Decrypting the reddit.com.gpg file three times
> before it shows me the data, even with `auth-source-do-cache' set to t.

The test case is a bit complicated, but I instrumented the normal
~/.authinfo reading, and it seemed to me that it would only read the
file once when I do the auth-source-search.

Does this work better for you too now?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#29665: 26.0.90; auth-source-pass decrypts entries 3 times on query
  2019-07-14 18:19 ` Lars Ingebrigtsen
@ 2020-08-12  3:12   ` Stefan Kangas
  2020-08-18 13:26     ` Stefan Kangas
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Kangas @ 2020-08-12  3:12 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: John Wiegley, 29665

Lars Ingebrigtsen <larsi@gnus.org> writes:

> "John Wiegley" <johnw@gnu.org> writes:
>
>> I've enabled auth-source-pass on my system as follows:
>>
>>   (use-package auth-source-pass
>>     :config
>>     (auth-source-pass-enable)
>>
>>     (defun auth-source-pass--read-entry (entry)
>>       "Return a string with the file content of ENTRY."
>>       (with-temp-buffer
>>         (insert-file-contents (expand-file-name
>>                                (format "%s.gpg" entry)
>>                                (getenv "PASSWORD_STORE_DIR")))
>>         (buffer-substring-no-properties (point-min) (point-max))))
>>
>>     (defun auth-source-pass-entries ()
>>       "Return a list of all password store entries."
>>       (let ((store-dir (getenv "PASSWORD_STORE_DIR")))
>>         (mapcar
>>          (lambda (file) (file-name-sans-extension (file-relative-name file store-dir)))
>>          (directory-files-recursively store-dir "\.gpg$")))))
>>
>> This works around the other bug I logged today. I have one file in my store:
>>
>>   ~/doc/.passwords/reddit.com
>>
>> It has a "login: jwiegley" field. I then run:
>>
>>   (auth-source-search :host "reddit.com" :user "jwiegley")
>>
>> After doing so, I can see it Decrypting the reddit.com.gpg file three times
>> before it shows me the data, even with `auth-source-do-cache' set to t.
>
> The test case is a bit complicated, but I instrumented the normal
> ~/.authinfo reading, and it seemed to me that it would only read the
> file once when I do the auth-source-search.
>
> Does this work better for you too now?

No reply here within 12 months.

Yesterday, I accidentally replied individually to Lars only, asking if
there is more to do here or if this should be closed.  He replied saying
that it should probably be closed.

Does anyone else have an opinion here?  Otherwise, I'll just go ahead
and close this.

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#29665: 26.0.90; auth-source-pass decrypts entries 3 times on query
  2020-08-12  3:12   ` Stefan Kangas
@ 2020-08-18 13:26     ` Stefan Kangas
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Kangas @ 2020-08-18 13:26 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 29665-done, John Wiegley

Stefan Kangas <stefan@marxist.se> writes:

> No reply here within 12 months.
>
> Yesterday, I accidentally replied individually to Lars only, asking if
> there is more to do here or if this should be closed.  He replied saying
> that it should probably be closed.
>
> Does anyone else have an opinion here?  Otherwise, I'll just go ahead
> and close this.

No further reply within a week, so I'm closing this now.

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-18 13:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-11 20:23 bug#29665: 26.0.90; auth-source-pass decrypts entries 3 times on query John Wiegley
2019-07-14 18:19 ` Lars Ingebrigtsen
2020-08-12  3:12   ` Stefan Kangas
2020-08-18 13:26     ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).