pass init does not re-encrypt existing files

Frank Thommen f.thommen at dkfz-heidelberg.de
Fri Jul 20 10:45:25 CEST 2018


Hi,

we don't use symlinks.  All files are directly in the passord store, 
which is referred to by the $PASSWORD_STORE_DIR environment variable.

Cheers
frank


On 20/07/18 09:30, Zafiris Sgouridis wrote:
> Hi!
> 
> I had the same issue. For me it was that my directory under .password-
> store was a symlink. When the function that searches for files to
> reencrypt it uses find and without the "-L" flag for following symlinks
> so it didn't find any files.
> 
> Are you using symlinks?
> 
> 
> My setup:
> 
> .password-store
>       secrets_test -> ~/git/secret_test
> 
> 
> I sent the patch below that adds "-L" so that find will follow symlinks
> and finds the files when reencrypting.
> 
> 
> 
>   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
> 


-- 
Frank Thommen          | HD-HuB / DKFZ Heidelberg
                        | f.thommen at dkfz-heidelberg.de


More information about the Password-Store mailing list