Move umasking for overlay images to wwctl

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-09-27 11:51:18 -06:00
parent d59ace3792
commit e9d3ad717c
2 changed files with 4 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"os"
"strings"
"syscall"
"github.com/spf13/cobra"
warewulfconf "github.com/warewulf/warewulf/internal/pkg/config"
@@ -83,6 +84,9 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
}
if BuildNodes || (!BuildHost && !BuildNodes) {
oldMask := syscall.Umask(007)
defer syscall.Umask(oldMask)
if len(OverlayNames) > 0 {
err = overlay.BuildSpecificOverlays(nodes, OverlayNames)
} else {

View File

@@ -543,9 +543,6 @@ func CpioCreate(
args = append(args, cpio_args...)
oldMask := syscall.Umask(007)
defer syscall.Umask(oldMask)
proc := exec.Command("cpio", args...)
stdin, err := proc.StdinPipe()