nodes.conf must not be world readable as it contains impipassword

This commit is contained in:
Christian Goll
2021-10-13 09:32:19 +02:00
parent bbf6398fed
commit 83232db4b5

View File

@@ -106,7 +106,7 @@ type NetDevEntry struct {
func init() {
//TODO: Check to make sure nodes.conf is found
if !util.IsFile(ConfigFile) {
c, err := os.OpenFile(ConfigFile, os.O_RDWR|os.O_CREATE, 0644)
c, err := os.OpenFile(ConfigFile, os.O_RDWR|os.O_CREATE, 0640)
if err != nil {
wwlog.Printf(wwlog.ERROR, "Could not create new configuration file: %s\n", err)
// just return silently, as init is also called for bash_completion