|
@@ -52,21 +52,21 @@ func MkdirAs(path string, mode os.FileMode, ownerUID, ownerGID int) error {
|
|
// MkdirAllAndChown creates a directory (include any along the path) and then modifies
|
|
// MkdirAllAndChown creates a directory (include any along the path) and then modifies
|
|
// ownership to the requested uid/gid. If the directory already exists, this
|
|
// ownership to the requested uid/gid. If the directory already exists, this
|
|
// function will still change ownership to the requested uid/gid pair.
|
|
// function will still change ownership to the requested uid/gid pair.
|
|
-func MkdirAllAndChown(path string, mode os.FileMode, ids IDPair) error {
|
|
|
|
- return mkdirAs(path, mode, ids.UID, ids.GID, true, true)
|
|
|
|
|
|
+func MkdirAllAndChown(path string, mode os.FileMode, owner IDPair) error {
|
|
|
|
+ return mkdirAs(path, mode, owner.UID, owner.GID, true, true)
|
|
}
|
|
}
|
|
|
|
|
|
// MkdirAndChown creates a directory and then modifies ownership to the requested uid/gid.
|
|
// MkdirAndChown creates a directory and then modifies ownership to the requested uid/gid.
|
|
// If the directory already exists, this function still changes ownership
|
|
// If the directory already exists, this function still changes ownership
|
|
-func MkdirAndChown(path string, mode os.FileMode, ids IDPair) error {
|
|
|
|
- return mkdirAs(path, mode, ids.UID, ids.GID, false, true)
|
|
|
|
|
|
+func MkdirAndChown(path string, mode os.FileMode, owner IDPair) error {
|
|
|
|
+ return mkdirAs(path, mode, owner.UID, owner.GID, false, true)
|
|
}
|
|
}
|
|
|
|
|
|
// MkdirAllAndChownNew creates a directory (include any along the path) and then modifies
|
|
// MkdirAllAndChownNew creates a directory (include any along the path) and then modifies
|
|
// ownership ONLY of newly created directories to the requested uid/gid. If the
|
|
// ownership ONLY of newly created directories to the requested uid/gid. If the
|
|
// directories along the path exist, no change of ownership will be performed
|
|
// directories along the path exist, no change of ownership will be performed
|
|
-func MkdirAllAndChownNew(path string, mode os.FileMode, ids IDPair) error {
|
|
|
|
- return mkdirAs(path, mode, ids.UID, ids.GID, true, false)
|
|
|
|
|
|
+func MkdirAllAndChownNew(path string, mode os.FileMode, owner IDPair) error {
|
|
|
|
+ return mkdirAs(path, mode, owner.UID, owner.GID, true, false)
|
|
}
|
|
}
|
|
|
|
|
|
// GetRootUIDGID retrieves the remapped root uid/gid pair from the set of maps.
|
|
// GetRootUIDGID retrieves the remapped root uid/gid pair from the set of maps.
|