move umask to before main() ensure that the whole store is initialized with the safe permissions
arĉi arcxi@dismail.de
Sat, 22 Jun 2024 16:56:24 +0200
1 files changed,
4 insertions(+),
4 deletions(-)
jump to
M
pa
→
pa
@@ -266,10 +266,6 @@
glob "$2" '../*' || glob "$2" '*/../*' && die "Category went out of bounds" - # Restrict permissions of any new files to - # only the current user. - umask 077 - # First, copy any existing identities files from the old # storage location to the new one for backwards compat. # Then, attempt key generation.@@ -296,5 +292,9 @@
# Ensure that debug mode is never enabled to # prevent the password from leaking. set +x + +# Restrict permissions of any new files to +# only the current user. +umask 077 [ "$1" ] || usage && main "$@"