From 83232db4b50fae90e16d82412d633f360c1825ec Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Wed, 13 Oct 2021 09:32:19 +0200 Subject: [PATCH] nodes.conf must not be world readable as it contains impipassword --- internal/pkg/node/datastructure.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pkg/node/datastructure.go b/internal/pkg/node/datastructure.go index e47275e5..a7f55ae6 100644 --- a/internal/pkg/node/datastructure.go +++ b/internal/pkg/node/datastructure.go @@ -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