GNU bug report logs - #29663
26.0.90; autho-source-pass-entries hardcodes .password-store directory

Previous Next

Package: emacs;

Reported by: "John Wiegley" <johnw <at> gnu.org>

Date: Mon, 11 Dec 2017 20:10:02 UTC

Severity: minor

Found in version 26.0.90

Fixed in version 27.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29663 in the body.
You can then email your comments to 29663 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#29663; Package emacs. (Mon, 11 Dec 2017 20:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "John Wiegley" <johnw <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 11 Dec 2017 20:10:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "John Wiegley" <johnw <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.90; autho-source-pass-entries hardcodes .password-store directory
Date: Mon, 11 Dec 2017 12:09:14 -0800
`auth-source-pass-entries' is defined as follows:

  (defun auth-source-pass-entries ()
    "Return a list of all password store entries."
    (let ((store-dir (expand-file-name "~/.password-store/")))
      (mapcar
       (lambda (file) (file-name-sans-extension (file-relative-name file store-dir)))
       (directory-files-recursively store-dir "\.gpg$"))))

However, the pass utility does not require that this be the directory where
passwords are stored. This should be a customizable variable, initialized from
the value of (getenv "PASSWORD_STORE_DIR") if set.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29663; Package emacs. (Mon, 11 Dec 2017 20:24:03 GMT) Full text and rfc822 format available.

Message #8 received at 29663 <at> debbugs.gnu.org (full text, mbox):

From: John Wiegley <johnw <at> gnu.org>
To: help-debbugs <at> gnu.org (GNU bug Tracking System)
Cc: 29663 <at> debbugs.gnu.org
Subject: Re: bug#29663: Acknowledgement (26.0.90;
 autho-source-pass-entries hardcodes .password-store directory)
Date: Mon, 11 Dec 2017 12:21:34 -0800
Note that the same problem occurs here too:

  (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)
                             "~/.password-store"))
      (buffer-substring-no-properties (point-min) (point-max))))

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29663; Package emacs. (Sun, 06 Oct 2019 02:09:02 GMT) Full text and rfc822 format available.

Message #11 received at 29663 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: John Wiegley <johnw <at> gnu.org>
Cc: 29663 <at> debbugs.gnu.org
Subject: Re: bug#29663: 26.0.90; autho-source-pass-entries hardcodes
 .password-store directory
Date: Sun, 6 Oct 2019 04:07:46 +0200
[Message part 1 (text/plain, inline)]
"John Wiegley" <johnw <at> gnu.org> writes:

> `auth-source-pass-entries' is defined as follows:
>
>   (defun auth-source-pass-entries ()
>     "Return a list of all password store entries."
>     (let ((store-dir (expand-file-name "~/.password-store/")))
>       (mapcar
>        (lambda (file) (file-name-sans-extension (file-relative-name file store-dir)))
>        (directory-files-recursively store-dir "\.gpg$"))))
>
> However, the pass utility does not require that this be the directory where
> passwords are stored. This should be a customizable variable, initialized from
> the value of (getenv "PASSWORD_STORE_DIR") if set.

Hi John,

I see that an option was added recently which takes care of the first
part of your requesti:

a63cbb56df 2019-01-13 Add auth-source-pass-filename option

I've attached a patch which initializes auth-source-pass-filename to
(getenv "PASSWORD_STORE_DIR") when it's set.  What do you think?

Best regards,
Stefan Kangas
[0001-Use-PASSWORD_STORE_DIR-in-auth-source-pass-when-set.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29663; Package emacs. (Mon, 07 Oct 2019 02:45:01 GMT) Full text and rfc822 format available.

Message #14 received at 29663 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 29663 <at> debbugs.gnu.org, John Wiegley <johnw <at> gnu.org>
Subject: Re: bug#29663: 26.0.90; autho-source-pass-entries hardcodes
 .password-store directory
Date: Mon, 07 Oct 2019 03:44:51 +0100
Stefan Kangas <stefan <at> marxist.se> writes:

> I've attached a patch which initializes auth-source-pass-filename to
> (getenv "PASSWORD_STORE_DIR") when it's set.  What do you think?

LGTM, FWIW.

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29663; Package emacs. (Sat, 02 Nov 2019 00:35:01 GMT) Full text and rfc822 format available.

Message #17 received at 29663 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 29663 <at> debbugs.gnu.org, John Wiegley <johnw <at> gnu.org>
Subject: Re: bug#29663: 26.0.90; autho-source-pass-entries hardcodes
 .password-store directory
Date: Sat, 02 Nov 2019 01:34:37 +0100
close 29663 27.1
thanks

"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> Stefan Kangas <stefan <at> marxist.se> writes:
>
>> I've attached a patch which initializes auth-source-pass-filename to
>> (getenv "PASSWORD_STORE_DIR") when it's set.  What do you think?
>
> LGTM, FWIW.

No other comments within 3 weeks, so I've now pushed this as commit
6b2745fe2e.  I'm consequently closing this bug.

Best regards,
Stefan Kangas




bug marked as fixed in version 27.1, send any further explanations to 29663 <at> debbugs.gnu.org and "John Wiegley" <johnw <at> gnu.org> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sat, 02 Nov 2019 00:35:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 30 Nov 2019 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 148 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.