[pass] [PATCH 1/2] check for pwgen's existance before using

Brian Mattern rephorm at rephorm.com
Thu Sep 20 18:06:11 CEST 2012


On Thu, 20 Sep 2012, Jason A. Donenfeld wrote:

> If you didn't notice before, I'm trying to keep runtime detection of
> things to an absolute minimum. That's why I didn't like the original
> darwin ramdisk hacks. Conceding for the statically sourced platform
> specific section avoided runtime detection. Still though, I don't want
> to clutter this either. Pwgen is always pwgen, on all systems I've
> seen, and is tiny and only requires libc. If you have a platform.sh
> file to add to the platforms/ directory that requires a different
> pwgen name, then I'd consider that. But until then, no.

Currently, the following occurs when pwgen is not present on the system:

$pass generate foo 10
pass: line 317: pwgen: command not found
[master 8e22fe2] Added generated password for foo to store.
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 foo.gpg
The generated password to foo is:

Storing an empty password with a burried error message is
less-than-desirable behavior. At least check that pwgen succeeded as in
the attached patch.

I'm fine with not splitting out $PWGEN (although I generally prefer
doing so for any non-standard commands).

Brian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-check-that-pwgen-succeeded-before-storing-password.patch
Type: text/x-diff
Size: 842 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20120920/28dbbc5f/attachment.patch>


More information about the Password-Store mailing list