pkg/system: MkdirAllWithACL: remove stubs and unused os.FileMode arg

Remove the stub implementation for non-Windows platforms, and remove the
os.FileMode argument, which is ignored on Windows.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-07-29 00:18:20 +02:00
parent 6f9e099fd3
commit 03f44e6d14
4 changed files with 4 additions and 14 deletions

View File

@@ -1,10 +0,0 @@
//go:build !windows
package system
import "os"
// MkdirAllWithACL is a wrapper for os.MkdirAll on unix systems.
func MkdirAllWithACL(path string, perm os.FileMode, _ string) error {
return os.MkdirAll(path, perm)
}

View File

@@ -15,7 +15,7 @@ const SddlAdministratorsLocalSystem = "D:P(A;OICI;GA;;;BA)(A;OICI;GA;;;SY)"
// MkdirAllWithACL is a custom version of os.MkdirAll modified for use on Windows
// so that it is both volume path aware, and can create a directory with
// an appropriate SDDL defined ACL.
func MkdirAllWithACL(path string, _ os.FileMode, sddl string) error {
func MkdirAllWithACL(path string, sddl string) error {
sa, err := makeSecurityAttributes(sddl)
if err != nil {
return &os.PathError{Op: "mkdirall", Path: path, Err: err}