Skip to content

Commit

Permalink
Set file permissions to rw (600) for newly created password files
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonVanAssche committed Mar 21, 2023
1 parent 8f14f34 commit 54d4cc3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bashpass
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,10 @@ main() {
printf 'email: %s\n' "${email}" >> "${config}"
fi

# Restrict new password file permissions to only the
# current user.
umask 077

case "${1}" in
"--help"| "-h") help;;
"--version"| "-v") version;;
Expand Down

0 comments on commit 54d4cc3

Please sign in to comment.