Build configs should not be globally writable (thanks Jeremy)

This commit is contained in:
Gregory Kurtzer
2022-01-19 06:01:33 +00:00
parent ae0455eba1
commit d35f368b21
14 changed files with 110 additions and 47 deletions

View File

@@ -20,9 +20,9 @@ func Configure(show bool) error {
if os.Getuid() == 0 {
fmt.Printf("Updating system keys\n")
wwkeydir := path.Join(buildconfig.SYSCONFDIR, "/etc/warewulf/keys") + "/"
wwkeydir := path.Join(buildconfig.SYSCONFDIR(), "/etc/warewulf/keys") + "/"
err := os.MkdirAll(path.Join(buildconfig.SYSCONFDIR, "warewulf/keys"), 0755)
err := os.MkdirAll(path.Join(buildconfig.SYSCONFDIR(), "warewulf/keys"), 0755)
if err != nil {
wwlog.Printf(wwlog.ERROR, "Could not create base directory: %s\n", err)
os.Exit(1)