Merge pull request #941 from mslacken/UmaskTftpDir

ensure that .Paths.Tftpdir."warewulf" is 0755
This commit is contained in:
Christian Goll
2024-09-23 08:37:18 +02:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -57,6 +57,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Refactor of `wwinit/init` to more properly address rootfs options. #1098
- Fix autodetected kernel sorting issue. #1332
- Avoid panic on container import #1244
- make sure that warewulfd has the permission 0755 at creation time #674
## v4.5.7, 2024-09-11

View File

@@ -8,12 +8,14 @@ import (
"github.com/warewulf/warewulf/internal/pkg/util"
"github.com/warewulf/warewulf/internal/pkg/warewulfd"
"github.com/warewulf/warewulf/internal/pkg/wwlog"
"golang.org/x/sys/unix"
)
func TFTP() (err error) {
controller := warewulfconf.Get()
var tftpdir string = path.Join(controller.TFTP.TftpRoot, "warewulf")
oldMask := unix.Umask(0)
defer unix.Umask(oldMask)
err = os.MkdirAll(tftpdir, 0755)
if err != nil {
return