Re: [PATCH] Add support for XKCD-style wordlist passwords

2018-10-30 Thread Cong Ma
On 30/10/2018 15:25, Lenz Weber wrote:
> 
> Of course, there is nothing speaking against saving a diceware password
> that has been generated elsewhere in pass - as a fallback, in case one
> forgets it.
> 
> But this is an edge use case, not a core use case and the stance on edge
> use cases has always been that there
> * are other unix tools for it
> * can always be a pass extension to offer it for those users that want
> it in pass
> 
> What are other people's opinions on this?

In my opinion, there is indeed a mismatch between Diceware-style,
memorable passphrases and the typical usage case of `pass', as you've
commented on. That's why I would like to take the extension approach
instead of a modification to the core command `pass generate'.

Cheers,
Cong.
___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


Re: [PATCH] Add support for XKCD-style wordlist passwords

2018-10-30 Thread Lenz Weber
Hi,

I want to bring up the question:

Is this something that pass needs? Or, more crass: should it offer this
feature or should it be considered harmful?

The point of pass, or any password manager, is not having to remember or
even know your password.

The default character set of pass has 31+26+26+10 = 93 characters, the
alphanumeric has at least 62.

Assuming a 6-word diceware password (approx. 30 characters) has 7776^6 ~
10^23 combinations, a password created with the default password set of
the same length has 10^59 combinations, or 10^53 for the alphanumeric
character set.

Assuming the use cases stated above (not having to ever remember your
password), using a diceware password just for a "nice looking" password
would sacrifice entropy somewhere between 10^30 and 10^36, bringing it
down to the complexity of a 12-character password with the default
character set.

I do not think this should be encouraged in any way.

Of course, there is nothing speaking against saving a diceware password
that has been generated elsewhere in pass - as a fallback, in case one
forgets it.

But this is an edge use case, not a core use case and the stance on edge
use cases has always been that there
* are other unix tools for it
* can always be a pass extension to offer it for those users that want
it in pass

What are other people's opinions on this?

Regards,
Lenz




On 10/30/18 6:00 AM, Adhityaa Chandrasekar wrote:
> ---
>  man/pass.1| 17 ++---
>  src/password-store.sh | 16 +++-
>  2 files changed, 21 insertions(+), 12 deletions(-)
> 
> This is my first time contributing to pass as a long-time user. In this
> patch, I'm adding support for XKCD-style passwords [1] composed of words
> from a wordlist. Since there is no standardised location for a
> dictionary of words, the user has to specify a path to a file with the
> --wordlist argument.
> 
> I don't know much bash/zsh/fish completions, so I'm afraid someone else
> will have to help with that.
> 
> [1] https://xkcd.com/936/
> 
>  - Adhityaa
> 
> diff --git a/man/pass.1 b/man/pass.1
> index 01a3fbe..72a83fc 100644
> --- a/man/pass.1
> +++ b/man/pass.1
> @@ -122,15 +122,18 @@ ensure that temporary files are created in 
> \fI/dev/shm\fP in order to avoid writ
>  difficult-to-erase disk sectors. If \fI/dev/shm\fP is not accessible, 
> fallback to
>  the ordinary \fITMPDIR\fP location, and print a warning.
>  .TP
> -\fBgenerate\fP [ \fI--no-symbols\fP, \fI-n\fP ] [ \fI--clip\fP, \fI-c\fP ] [ 
> \fI--in-place\fP, \fI-i\fP | \fI--force\fP, \fI-f\fP ] \fIpass-name 
> [pass-length]\fP
> +\fBgenerate\fP [ \fI--no-symbols\fP, \fI-n\fP ] [ \fI--wordlist 
> /path/to/wordlist\fP, \fI-w /path/to/wordlist\fP ][ \fI--clip\fP, \fI-c\fP ] 
> [ \fI--in-place\fP, \fI-i\fP | \fI--force\fP, \fI-f\fP ] \fIpass-name 
> [pass-length]\fP
>  Generate a new password using \fB/dev/urandom\fP of length \fIpass-length\fP
>  (or \fIPASSWORD_STORE_GENERATED_LENGTH\fP if unspecified) and insert into
> -\fIpass-name\fP. If \fI--no-symbols\fP or \fI-n\fP is specified, do not use
> -any non-alphanumeric characters in the generated password. The character 
> sets used
> -in generating passwords can be changed with the 
> \fIPASSWORD_STORE_CHARACTER_SET\fP and
> -\fIPASSWORD_STORE_CHARACTER_SET_NO_SYMBOLS\fP environment variables, 
> described below.
> -If \fI--clip\fP or \fI-c\fP is specified, do not print the password but 
> instead copy
> -it to the clipboard using
> +\fIpass-name\fP. If \fI--no-symbols\fP or \fI-n\fP is specified, do not use 
> any
> +non-alphanumeric characters in the generated password. If \fI--wordlist\fP is
> +specified, along with a file as argument containing a list of words to choose
> +from, four words will be randomly chosen and used as password. The character
> +sets used in generating passwords can be changed with the
> +\fIPASSWORD_STORE_CHARACTER_SET\fP and
> +\fIPASSWORD_STORE_CHARACTER_SET_NO_SYMBOLS\fP environment variables, 
> described
> +below.  If \fI--clip\fP or \fI-c\fP is specified, do not print the password 
> but
> +instead copy it to the clipboard using
>  .BR xclip (1)
>  and then restore the clipboard after 45 (or \fIPASSWORD_STORE_CLIP_TIME\fP) 
> seconds. If \fI--qrcode\fP
>  or \fI-q\fP is specified, do not print the password but instead display a QR 
> code using
> diff --git a/src/password-store.sh b/src/password-store.sh
> index d89d455..2778c26 100755
> --- a/src/password-store.sh
> +++ b/src/password-store.sh
> @@ -491,12 +491,13 @@ cmd_edit() {
>  }
>  
>  cmd_generate() {
> - local opts qrcode=0 clip=0 force=0 characters="$CHARACTER_SET" 
> inplace=0 pass
> - opts="$($GETOPT -o nqcif -l no-symbols,qrcode,clip,in-place,force -n 
> "$PROGRAM" -- "$@")"
> + local opts qrcode=0 clip=0 force=0 characters="$CHARACTER_SET" 
> wordlist=0 inplace=0 pass
> + opts="$($GETOPT -o nw:qcif -l 
> no-symbols,wordlist:,qrcode,clip,in-place,force -n "$PROGRAM" -- "$@")"
>   local err=$?
>   eval set -- 

Re: [PATCH] Add support for XKCD-style wordlist passwords

2018-10-30 Thread Brad Knowles
On Oct 30, 2018, at 4:33 AM, Kjetil Torgrim Homme 
 wrote:

> Norwegian words are quite long...
> 
> $ aspell -d no dump master | grep -v "['A-Z]" | wc
> 489533  489533 6966844
> 
> average length of 13 characters.  this doesn't really help entropy,
> though.  489533 distinct words give 18.9 bits of entropy each, so the
> above pass phrases (of four words) have 75 bits, or 5.74e+22.  still not
> a huge amount, but the attacker would have to know that this is the
> method I use to make pass phrases to successfully reduce his search space.

One key aspect of diceware/xkcd-style pass-strings is that the words that 
compose the string are themselves easy to remember and easy to distinguish from 
each other.  That's why the dictionaries are relatively small -- 10,000 
well-chosen words for your dictionary is much better than 489,000 words that 
comprise the entire dictionary but many of which are much lower quality words.

Going from 8k words to 16k words only increases your entropy per word by one 
bit (2^13 vs. 2^14), but it is likely to make many of the additional words 
harder to remember, harder to pronounce and type, and harder to distinguish.

For English-language words, this is why the EFF significantly improved the 
situation with their "long word list".  It still satisfies all the goals of a 
diceware/xkcd-type wordlist, but the words are longer (and significantly longer 
on average), while still being easy to remember, easy to type and pronounce, 
and easy to distinguish.


You compensate for low entropy per word by making pass-strings that are much 
longer.

How much longer you make them is up to you, but if you want a pass string with 
128 bits of entropy, then you could create a pass-string that is ten words long 
(128/13 ~= 9.84615384615384615384).

At which point, yeah -- you might want to store those in a password manager.


But you always -- always -- always ... assume that the attacker knows the 
mechanism(s) by which your passwords/passphrases/pass-strings are generated and 
will attack them in the most efficient manner possible.


I do support -- and use -- diceware/xkcd-style passwords for certain functions, 
but I don't know that I'd make it a core functionality of this program.

-- 
Brad Knowles 

Please forgive any typos.  I'm fighting a failing keyboard on my laptop, in 
addition to having a broken finger.

___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


[PATCH 3/5] Infer gnu-getopt path using MacPorts

2018-10-30 Thread Artur Sterz
Unlike using brew, the MacPorts default path is assumed when infering the path 
to gnu-getopts.
This should not be done, since it is possible to install MacPorts and the ports 
in
non-standard paths.
---
 src/platform/darwin.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh
index bc232c3..1d9ac8f 100644
--- a/src/platform/darwin.sh
+++ b/src/platform/darwin.sh
@@ -45,7 +45,7 @@ qrcode() {
 
 GETOPT="$(PATH="/usr/local/opt/gnu-getopt/bin:/opt/local/bin:/usr/local/bin" 
command -v getopt)" || \
 GETOPT="$(brew --prefix 2>/dev/null)/opt/gnu-getopt/bin/getopt" || \
-GETOPT="$(which port &>/dev/null && echo /opt/local/bin/getopt)"
+GETOPT="$(port content getopt | grep -E '/s?bin/')"
 
 SHRED="srm -f -z"
 BASE64="openssl base64"
-- 
2.17.1 (Apple Git-112)

___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


[PATCH 2/5] Speed up the brew-based gnu-getop lookup

2018-10-30 Thread Artur Sterz
If gnu-getopt is not installed in the brew default path,
brew --prefix gnu-getopt will be used, which is annoyingly slow.
brew --prefix is way faster and should be prefered.
---
 src/platform/darwin.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh
index e00b928..bc232c3 100644
--- a/src/platform/darwin.sh
+++ b/src/platform/darwin.sh
@@ -44,7 +44,7 @@ qrcode() {
 }
 
 GETOPT="$(PATH="/usr/local/opt/gnu-getopt/bin:/opt/local/bin:/usr/local/bin" 
command -v getopt)" || \
-GETOPT="$(brew --prefix gnu-getopt 2>/dev/null)/bin/getopt" || \
+GETOPT="$(brew --prefix 2>/dev/null)/opt/gnu-getopt/bin/getopt" || \
 GETOPT="$(which port &>/dev/null && echo /opt/local/bin/getopt)"
 
 SHRED="srm -f -z"
-- 
2.17.1 (Apple Git-112)

___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


[PATCH 1/5] Use three assumed default paths for gnu-getopt lookup

2018-10-30 Thread Artur Sterz
brew --prefix gnu-getopt will allways make some git lookups which may take
longer, depending on your internet connectivity. We therefore first look
in some default location for gnu-getopt. If it is not found there, make
the regular lookup.
---
 src/platform/darwin.sh | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh
index 342ecce..e00b928 100644
--- a/src/platform/darwin.sh
+++ b/src/platform/darwin.sh
@@ -43,6 +43,9 @@ qrcode() {
fi
 }
 
-GETOPT="$(brew --prefix gnu-getopt 2>/dev/null || { which port &>/dev/null && 
echo /opt/local; } || echo /usr/local)/bin/getopt"
+GETOPT="$(PATH="/usr/local/opt/gnu-getopt/bin:/opt/local/bin:/usr/local/bin" 
command -v getopt)" || \
+GETOPT="$(brew --prefix gnu-getopt 2>/dev/null)/bin/getopt" || \
+GETOPT="$(which port &>/dev/null && echo /opt/local/bin/getopt)"
+
 SHRED="srm -f -z"
 BASE64="openssl base64"
-- 
2.17.1 (Apple Git-112)

___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


[PATCH 5/5] Move gnu-getopt path infering into own function

2018-10-30 Thread Artur Sterz
---
 src/platform/darwin.sh | 19 ---
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh
index a9d32ce..75db6a0 100644
--- a/src/platform/darwin.sh
+++ b/src/platform/darwin.sh
@@ -43,14 +43,19 @@ qrcode() {
fi
 }
 
-GETOPT="$(PATH="/usr/local/opt/gnu-getopt/bin:/opt/local/bin:/usr/local/bin" 
command -v getopt)" || \
-GETOPT="$(brew --prefix 2>/dev/null)/opt/gnu-getopt/bin/getopt" || \
-GETOPT="$(port content getopt | grep -E '/s?bin/')"
+get_getopt() {
+   local 
GETOPT="$(PATH="/usr/local/opt/gnu-getopt/bin:/opt/local/bin:/usr/local/bin" 
command -v getopt)" || \
+   local GETOPT="$(brew --prefix 2>/dev/null)/opt/gnu-getopt/bin/getopt" 
|| \
+   local GETOPT="$(port content getopt | grep -E '/s?bin/')"
 
-if [ ! $GETOPT ]; then
-   echo "'getopt' is not installed. Please use 'brew' or 'port' to install 
it."
-   exit 1
-fi
+   if [ ! $GETOPT ]; then
+   echo "'getopt' is not installed. Please use 'brew' or 'port' to 
install it."
+   exit 1
+   fi
+
+   echo $GETOPT
+}
 
+GETOPT=$(get_getopt)
 SHRED="srm -f -z"
 BASE64="openssl base64"
-- 
2.17.1 (Apple Git-112)

___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


Re: [PATCH] Add support for XKCD-style wordlist passwords

2018-10-30 Thread Kjetil Torgrim Homme
Den 30. okt. 2018 12:10, skreiv Matthieu Weber:
> On Tue, 30 Oct 2018 at 10:33AM +0100, Kjetil Torgrim Homme wrote:
>> yes, but sometimes you need to enter this password by hand.  I use horse
>> battery passwords when I might need to enter the password on a mobile
>> phone or on a console in a chilly data centre in the middle of the
>> night.  both of these will often have problems with strange characters
>> or keyboard layouts (is "&" on Shift 6 or Shift 7?  since there is often
>> no echo, there is no way to be sure!)
> 
> So you want passwords that are easy to type: generate passwords that are
> made entirely of lowercase letters, all you need is 40% more characters
> to have the same entropy as a password made of alphanumerics+symbols
> i.e., 11 characters instead of 8. They will be easy enough to type even
> on exotic keyboards, and can be generated using only tools that pass
> uses already. All you need is to add to “pass generate” an option to
> reduce $CHARACTER_SET to [:lower:].

it is not easy to type wahseepienoofac on a mobile phone, IMHO.  but
adding periods (not hyphens!  the key moves around) will help - not for
entropy, but to make it easier to read and track how far I've gotten:

  wah.see.pie.noo.fac

(I just realised I am lucky that I never have qwertz or azerty in my
environment...  that would reduce the number of available letters to 21,
ertuiop/sdfghjkl/xcvbnm, by my count.  digits, comma and period brings
the total to 33.)

>> average length of 13 characters.  this doesn't really help entropy,
>> though.  489533 distinct words give 18.9 bits of entropy each, so the
>> above pass phrases (of four words) have 75 bits, or 5.74e+22.  still not
>> a huge amount, but the attacker would have to know that this is the
>> method I use to make pass phrases to successfully reduce his search space.
> 
> You can get 75 bits of entropy with 16 lowercase letters or 14
> mixed-case letters. That is surely easier to type than your example.

it really depends on your keyboard and brain :-)

-- 
Kjetil T. Homme
Redpill Linpro - Changing the game



signature.asc
Description: OpenPGP digital signature
___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


Re: [PATCH] Add support for XKCD-style wordlist passwords

2018-10-30 Thread Matthieu Weber
On Tue, 30 Oct 2018 at 10:33AM +0100, Kjetil Torgrim Homme wrote:
> Den 30. okt. 2018 08:25, skreiv Lenz Weber:
> > Is this something that pass needs? Or, more crass: should it offer this
> > feature or should it be considered harmful?
> > 
> > The point of pass, or any password manager, is not having to remember or
> > even know your password.
> 
> yes, but sometimes you need to enter this password by hand.  I use horse
> battery passwords when I might need to enter the password on a mobile
> phone or on a console in a chilly data centre in the middle of the
> night.  both of these will often have problems with strange characters
> or keyboard layouts (is "&" on Shift 6 or Shift 7?  since there is often
> no echo, there is no way to be sure!)

So you want passwords that are easy to type: generate passwords that are
made entirely of lowercase letters, all you need is 40% more characters
to have the same entropy as a password made of alphanumerics+symbols
i.e., 11 characters instead of 8. They will be easy enough to type even
on exotic keyboards, and can be generated using only tools that pass
uses already. All you need is to add to “pass generate” an option to
reduce $CHARACTER_SET to [:lower:].
 
> average length of 13 characters.  this doesn't really help entropy,
> though.  489533 distinct words give 18.9 bits of entropy each, so the
> above pass phrases (of four words) have 75 bits, or 5.74e+22.  still not
> a huge amount, but the attacker would have to know that this is the
> method I use to make pass phrases to successfully reduce his search space.

You can get 75 bits of entropy with 16 lowercase letters or 14
mixed-case letters. That is surely easier to type than your example.

Matthieu
-- 
 (~._.~)Matthieu Weber - mwe...@free.fr  (~._.~)
  ( ? )http://weber.fi.eu.org/( ? ) 
 ()- -()  public key id : 0x85CB340EFCD5E0B3 ()- -()
 (_)-(_) "Humor ist, wenn man trotzdem lacht (Otto J. Bierbaum)" (_)-(_)


signature.asc
Description: PGP signature
___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


Re: [PATCH] Add support for XKCD-style wordlist passwords

2018-10-30 Thread Matthieu Weber
On Tue, 30 Oct 2018 at 08:25AM +0100, Lenz Weber wrote:
> Is this something that pass needs? Or, more crass: should it offer this
> feature or should it be considered harmful?

Not necessarily harmful, but useless within the context of a password
manager.

> The point of pass, or any password manager, is not having to remember or
> even know your password.

So you can generate short, complicated passwords that still have enough
entropy. Those don't have to be short, but what's the benefit of
generating a long password?

> What are other people's opinions on this?

My (more or less informed) side opinion about the necessary entropy:
what matters is the average time it takes an attacker to guess the
password. This depends very much on how it is stored (especially the
hashing method). If you are sure that the hashing method is going to
slow down the attacker considerably, then the password's entropy can be
quite low, and the lower entropy of a diceware password is not a
problem. Of course, high entropy does not hurt if it comes at no extra
cost and you don't have to input the password manually.

Matthieu
-- 
 (~._.~)Matthieu Weber - mwe...@free.fr  (~._.~)
  ( ? )http://weber.fi.eu.org/( ? ) 
 ()- -()  public key id : 0x85CB340EFCD5E0B3 ()- -()
 (_)-(_) "Humor ist, wenn man trotzdem lacht (Otto J. Bierbaum)" (_)-(_)


signature.asc
Description: PGP signature
___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


Re: [PATCH] Add support for XKCD-style wordlist passwords

2018-10-30 Thread Tobias Girstmair
I think there is a place for rememberable passwords in a password
manager, for example credentials for logging into a graphical session
(where you can't (easily) use a password manager).

I do think that this is better made an extension than implemented into
pass itself though. This would allow greater freedom in choosing
dependencies and including wordlist(s).
___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


New extension: pass meta

2018-10-30 Thread pwd-password-store
Hi,

I've written a pass extension called "pass meta", which allows retrieval
of specific properties from the metadata in a password file. For example:

pass meta mypwdfile user

Will retrieve the value of the user property. It allows searching for
multiple terms (like usernames,user,login), copying the result to the
clip board, and more is coming.

The extension can be found here:
https://github.com/rjekker/pass-extension-meta

If you would like to link to this project from the pass homepage, please
do so.

Things this script does not do yet:

- edit values
- support shells other than bash

Greetings,

rjekker



signature.asc
Description: OpenPGP digital signature
___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


Re: [PATCH] Speedup pass on macOS and brew

2018-10-30 Thread pass-maillinglist
As there were no more complaints, I guess my patch is ok? I will tag it [PATCH] 
and hope, that it will go upstream.

Part 1:
Use three assumed default paths for gnu-getopt lookup

brew --prefix gnu-getopt will allways make some git lookups which may take
longer, depending on your internet connectivity. We therefore first look
in some default location for gnu-getopt. If it is not found there, make
the regular lookup.

diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh
index 342ecce..4905c7d 100644
--- a/src/platform/darwin.sh
+++ b/src/platform/darwin.sh
@@ -43,6 +43,9 @@ qrcode() {
fi
 }

-GETOPT="$(brew --prefix gnu-getopt 2>/dev/null || { which port &>/dev/null && 
echo /opt/local; } || echo /usr/local)/bin/getopt"
+GETOPT="$(PATH="/usr/local/opt/gnu-getopt/bin:/opt/local/bin:/usr/local/bin" 
command -v getopt)" || \
+GETOPT="$(brew --prefix gnu-getopt 2>/dev/null)/bin/getopt" || \
+GETOPT="$(which port &>/dev/null && echo /opt/local/bin/getopt)"
+
 SHRED="srm -f -z"
 BASE64="openssl base64“


Part 2:
Speed up the brew-based gnu-getop lookup

If gnu-getopt is not installed in the brew default path,
brew --prefix gnu-getopt will be used, which is annoyingly slow.
brew --prefix is way faster and should be prefered.

diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh
index 4905c7d..2ee608b 100644
--- a/src/platform/darwin.sh
+++ b/src/platform/darwin.sh
@@ -44,7 +44,7 @@ qrcode() {
 }

 GETOPT="$(PATH="/usr/local/opt/gnu-getopt/bin:/opt/local/bin:/usr/local/bin" 
command -v getopt)" || \
-GETOPT="$(brew --prefix gnu-getopt 2>/dev/null)/bin/getopt" || \
+GETOPT="$(brew --prefix 2>/dev/null)/opt/gnu-getopt/bin/getopt" || \
 GETOPT="$(which port &>/dev/null && echo /opt/local/bin/getopt)"

 SHRED="srm -f -z“


Part 3:
Infer gnu-getopt path using MacPorts

Unlike using brew, the MacPorts default path is assumed when infering the path 
to gnu-getopts.
This should not be done, since it is possible to install MacPorts and the ports 
in
non-standard paths.

diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh
index 2ee608b..220dd78 100644
--- a/src/platform/darwin.sh
+++ b/src/platform/darwin.sh
@@ -45,7 +45,7 @@ qrcode() {

 GETOPT="$(PATH="/usr/local/opt/gnu-getopt/bin:/opt/local/bin:/usr/local/bin" 
command -v getopt)" || \
 GETOPT="$(brew --prefix 2>/dev/null)/opt/gnu-getopt/bin/getopt" || \
-GETOPT="$(which port &>/dev/null && echo /opt/local/bin/getopt)"
+GETOPT="$(port content getopt | grep -E '/s?bin/')"

 SHRED="srm -f -z"
 BASE64="openssl base64“


Part 4:
Notify the user if getopt is not installed

In the past commits we implemented a new way to find gnu-getopt on macOS.
If we can not find it, pass can not be used, thus the user should be
notified about this.

diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh
index 220dd78..9ff46df 100644
--- a/src/platform/darwin.sh
+++ b/src/platform/darwin.sh
@@ -47,5 +47,11 @@ 
GETOPT="$(PATH="/usr/local/opt/gnu-getopt/bin:/opt/local:/usr/local/bin/getopt"
 GETOPT="$(brew --prefix 2>/dev/null)/opt/gnu-getopt/bin/getopt" || \
 GETOPT="$(port content getopt | grep -E '/s?bin/')"

+echo $GETOPT
+if [ ! $GETOPT ]; then
+   echo "'getopt' is not installed. Please use 'brew' or 'port' to install 
it."
+   exit 1
+fi
+
 SHRED="srm -f -z"
 BASE64="openssl base64“


Part 5:
Use function for infering gnu-getopt on macOS

diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh
index 9ff46df..9c33c08 100644
--- a/src/platform/darwin.sh
+++ b/src/platform/darwin.sh
@@ -43,15 +43,18 @@ qrcode() {
fi
 }

-GETOPT="$(PATH="/usr/local/opt/gnu-getopt/bin:/opt/local/bin:/usr/local/bin" 
command -v getopt)" || \
-GETOPT="$(brew --prefix 2>/dev/null)/opt/gnu-getopt/bin/getopt" || \
-GETOPT="$(port content getopt | grep -E '/s?bin/')"
+get_getopt() {
+   local 
GETOPT="$(PATH="/usr/local/opt/gnu-getopt/bin:/opt/local/bin:/usr/local/bin" 
command -v getopt)" || \
+   local GETOPT="$(brew --prefix 2>/dev/null)/opt/gnu-getopt/bin/getopt" 
|| \
+   local GETOPT="$(port content getopt | grep -E '/s?bin/')"

-echo $GETOPT
-if [ ! $GETOPT ]; then
-   echo "'getopt' is not installed. Please use 'brew' or 'port' to install 
it."
-   exit 1
-fi
+   if [ ! $GETOPT ]; then
+   echo "'getopt' is not installed. Please use 'brew' or 'port' to 
install it."
+   exit 1
+   fi
+   echo $GETOPT
+}

+GETOPT=$(get_getopt)
 SHRED="srm -f -z"
 BASE64="openssl base64"___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store


Incorrect extensions dir on homepage

2018-10-30 Thread pwd-password-store
Hi,

The homepage says that extensions should be installed in
~/.password-store/, but the manpage mentions
~/.password-store/.extensions/, which is the correct location, afaik.

It seems the source homepage itself is not hosted on git so I'm unable
to create a patch..

RJ



signature.asc
Description: OpenPGP digital signature
___
Password-Store mailing list
Password-Store@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/password-store