Skip to content

Commit

Permalink
make config files readable by root only (#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkasun authored Sep 22, 2023
1 parent 3af8787 commit 951f533
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func WriteNetclientConfig() error {
return errors.New("failed to obtain lockfile")
}
defer Unlock(lockfile)
f, err := os.OpenFile(file, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, os.ModePerm)
f, err := os.OpenFile(file, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0700)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion config/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func WriteNodeConfig() error {
return err
}
defer Unlock(lockfile)
f, err := os.OpenFile(file, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, os.ModePerm)
f, err := os.OpenFile(file, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0700)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion config/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func WriteServerConfig() error {
return err
}
defer Unlock(lockfile)
f, err := os.OpenFile(file, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, os.ModePerm)
f, err := os.OpenFile(file, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0700)
if err != nil {
return err
}
Expand Down

0 comments on commit 951f533

Please sign in to comment.