[PATCH] Follow links when finding files to reencrypt
Jake Yip
jake.yip at ardc.edu.au
Fri Feb 8 13:55:39 CET 2019
Users might choose to symlink ~/.password-store/ dirs e.g.
~/.password-store/synced -> ~/Dropbox/synced
so that their passwords can be synced across computers.
However, reencrypt_path() doesn't find files in symlinks so it misses
reencrypting them when you add a key. Make `find` follow symlinks so
that this will work.
---
src/password-store.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/password-store.sh b/src/password-store.sh
index d89d455..20dee76 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -134,7 +134,7 @@ reencrypt_path() {
mv "$passfile_temp" "$passfile" || rm -f "$passfile_temp"
fi
prev_gpg_recipients="${GPG_RECIPIENTS[*]}"
- done < <(find "$1" -path '*/.git' -prune -o -iname '*.gpg' -print0)
+ done < <(find -L "$1" -path '*/.git' -prune -o -iname '*.gpg' -print0)
}
check_sneaky_paths() {
local path
--
2.20.1
More information about the Password-Store
mailing list