Skip to content

Commit

Permalink
fix: allow 0400 permissions for config file
Browse files Browse the repository at this point in the history
- closes #18

Signed-off-by: Liam Stanley <[email protected]>
  • Loading branch information
lrstanley committed Aug 25, 2022
1 parent 3a27fa0 commit 298403d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ func readConfig(path string) error {
return err
}

if perms := permbits.FileMode(fi.Mode()); perms != 0o600 {
return fmt.Errorf("permissions of %q are insecure: %s, please use 0600", path, perms)
if perms := permbits.FileMode(fi.Mode()); perms != 0o600 && perms != 0o400 {
return fmt.Errorf("permissions of %q are insecure: %s, please use 0600 or 0400", path, perms)
}

// Check to see if it's updated.
Expand Down

0 comments on commit 298403d

Please sign in to comment.