Create age dir with safer permissions
j3s j3s@c3f.net
Thu, 28 Jan 2021 15:13:38 -0600
1 files changed,
3 insertions(+),
3 deletions(-)
jump to
M
bin/pa
→
bin/pa
@@ -186,9 +186,6 @@
cd "$PA_DIR" || die "Can't access password directory" - [ -f ~/.age/key.txt ] || pw_gen - pubkey=$(sed -n 's/.*\(age\)/\1/p' ~/.age/key.txt) - glob "$1" '[acdes]*' && [ -z "$2" ] && die "Missing [name] argument"@@ -210,6 +207,9 @@
# Restrict permissions of any new files to # only the current user. umask 077 + + [ -f ~/.age/key.txt ] || pw_gen + pubkey=$(sed -n 's/.*\(age\)/\1/p' ~/.age/key.txt) # Ensure that we leave the terminal in a usable # state on exit or Ctrl+C.