Documentation
¶
Index ¶
- func GetRootUIDGID(uidMap, gidMap []IDMap) (int, int, error)deprecated
- func MkdirAllAndChown(path string, mode os.FileMode, owner Identity) errordeprecated
- func MkdirAllAndChownNew(path string, mode os.FileMode, owner Identity) errordeprecated
- func MkdirAndChown(path string, mode os.FileMode, owner Identity) errordeprecated
- func ToUserIdentityMapping(u IdentityMapping) user.IdentityMappingdeprecated
- type IDMapdeprecated
- type Identity
- func CurrentIdentity() Identitydeprecated
- type IdentityMapping
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRootUIDGID
deprecated
func MkdirAllAndChown
deprecated
MkdirAllAndChown creates a directory (include any along the path) and then modifies ownership to the requested uid/gid. If the directory already exists, this function will still change ownership and permissions.
Deprecated: use user.MkdirAllAndChown instead.
func MkdirAllAndChownNew
deprecated
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 directories along the path exist, no change of ownership or permissions will be performed
Deprecated: use user.MkdirAllAndChown with the user.WithOnlyNew option instead.
func MkdirAndChown
deprecated
MkdirAndChown creates a directory and then modifies ownership to the requested uid/gid. If the directory already exists, this function still changes ownership and permissions. Note that unlike os.Mkdir(), this function does not return IsExist error in case path already exists.
Deprecated: use user.MkdirAndChown instead.
func ToUserIdentityMapping
deprecated
func ToUserIdentityMapping(u IdentityMapping) user.IdentityMapping
ToUserIdentityMapping converts an idtools.IdentityMapping to a user.IdentityMapping.
Deprecated: use user.IdentityMapping directly, this is transitioning to user package.
Types ¶
type IDMap
deprecated
type IDMap struct { ContainerID int `json:"container_id"` HostID int `json:"host_id"` Size int `json:"size"` }
IDMap contains a single entry for user namespace range remapping. An array of IDMap entries represents the structure that will be provided to the Linux kernel for creating a user namespace.
Deprecated: use user.IDMap instead.
type Identity ¶
Identity is either a UID and GID pair or a SID (but not both)
func CurrentIdentity
deprecated
func CurrentIdentity() Identity
CurrentIdentity returns the identity of the current process
Deprecated: use os.Getuid and os.Getegid instead.
type IdentityMapping ¶
IdentityMapping contains a mappings of UIDs and GIDs. The zero value represents an empty mapping.
func FromUserIdentityMapping
deprecated
func FromUserIdentityMapping(u user.IdentityMapping) IdentityMapping
FromUserIdentityMapping converts a user.IdentityMapping to an idtools.IdentityMapping.
Deprecated: use user.IdentityMapping directly, this is transitioning to user package.
func (IdentityMapping) Empty ¶
func (i IdentityMapping) Empty() bool
Empty returns true if there are no id mappings
func (IdentityMapping) RootPair ¶
func (i IdentityMapping) RootPair() Identity
RootPair returns a uid and gid pair for the root user. The error is ignored because a root user always exists, and the defaults are correct when the uid and gid maps are empty.
func (IdentityMapping) ToContainer ¶
func (i IdentityMapping) ToContainer(pair Identity) (int, int, error)
ToContainer returns the container UID and GID for the host uid and gid