reencrypt find dosn't follow symlinks
zafiris at zafiris.se
zafiris at zafiris.se
Tue Jun 26 15:30:38 CEST 2018
Hi!
I am using pass with my password store directories as symlinks to where
I store all my git repositories.
When trying to reencrypt all the gpg files it doesn't find them because
find don't follow symlinks if "-L" is not specified.
This is my setup:
.password-store
secrets_test -> ~/git/secret_test
This patch adds "-L" so that find will follow symlinks and finds the
files.
From ab124563a079f01a2c4c0797f34eaf35f7e34579 Mon Sep 17 00:00:00 2001
From: Zafiris Sgouridis <zafiris at zafiris.se>
Date: Tue, 26 Jun 2018 11:52:32 +0200
Subject: [PATCH 1/1] Add ability to use symlinks for directory under
pass-store. Use "-L" with "find" to make it follow symlinks so that it
also
finds files even if the directories under "./password-store" are
symlinks.
---
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 715dc93..368f1d9 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -133,7 +133,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.17.1
Regards
Zafiris
More information about the Password-Store
mailing list