mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
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:
@@ -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)
|
||||
}
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user