Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -52,21 +52,21 @@ func MkdirAs(path string, mode os.FileMode, ownerUID, ownerGID int) error {
|
| 52 | 52 |
// MkdirAllAndChown creates a directory (include any along the path) and then modifies |
| 53 | 53 |
// ownership to the requested uid/gid. If the directory already exists, this |
| 54 | 54 |
// function will still change ownership to the requested uid/gid pair. |
| 55 |
-func MkdirAllAndChown(path string, mode os.FileMode, ids IDPair) error {
|
|
| 56 |
- return mkdirAs(path, mode, ids.UID, ids.GID, true, true) |
|
| 55 |
+func MkdirAllAndChown(path string, mode os.FileMode, owner IDPair) error {
|
|
| 56 |
+ return mkdirAs(path, mode, owner.UID, owner.GID, true, true) |
|
| 57 | 57 |
} |
| 58 | 58 |
|
| 59 | 59 |
// MkdirAndChown creates a directory and then modifies ownership to the requested uid/gid. |
| 60 | 60 |
// If the directory already exists, this function still changes ownership |
| 61 |
-func MkdirAndChown(path string, mode os.FileMode, ids IDPair) error {
|
|
| 62 |
- return mkdirAs(path, mode, ids.UID, ids.GID, false, true) |
|
| 61 |
+func MkdirAndChown(path string, mode os.FileMode, owner IDPair) error {
|
|
| 62 |
+ return mkdirAs(path, mode, owner.UID, owner.GID, false, true) |
|
| 63 | 63 |
} |
| 64 | 64 |
|
| 65 | 65 |
// MkdirAllAndChownNew creates a directory (include any along the path) and then modifies |
| 66 | 66 |
// ownership ONLY of newly created directories to the requested uid/gid. If the |
| 67 | 67 |
// directories along the path exist, no change of ownership will be performed |
| 68 |
-func MkdirAllAndChownNew(path string, mode os.FileMode, ids IDPair) error {
|
|
| 69 |
- return mkdirAs(path, mode, ids.UID, ids.GID, true, false) |
|
| 68 |
+func MkdirAllAndChownNew(path string, mode os.FileMode, owner IDPair) error {
|
|
| 69 |
+ return mkdirAs(path, mode, owner.UID, owner.GID, true, false) |
|
| 70 | 70 |
} |
| 71 | 71 |
|
| 72 | 72 |
// GetRootUIDGID retrieves the remapped root uid/gid pair from the set of maps. |