password-store

Simple password manager using gpg and ordinary unix directories
git clone https://git.zx2c4.com/password-store
Log | Files | Refs | README | LICENSE

commit 5bc781bd38ea4141e5e3b9110bf28214773cf1a3
parent e12affb8e4b214e84cfbedfe00e4ff358d2e7e86
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date:   Thu, 20 Sep 2012 18:13:25 +0200

Quit if pwgen returns nothing.

Reported-by: Brian Mattern <rephorm@rephorm.com>

Diffstat:
Msrc/password-store.sh | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/password-store.sh b/src/password-store.sh @@ -312,6 +312,7 @@ case "$command" in [[ $force -eq 0 && -e $passfile ]] && yesno "An entry already exists for $path. Overwrite it?" pass="$(pwgen -s $symbols $length 1)" + [[ -n $pass ]] || exit 1 $GPG -e -r "$ID" -o "$passfile" $GPG_OPTS <<<"$pass" git_add_file "$passfile" "Added generated password for $path to store."