Documentation
¶
Index ¶
- Constants
- func GetHostIDMappings(pid string) ([]specs.LinuxIDMapping, []specs.LinuxIDMapping, error)
- func GetRootlessGID() int
- func GetRootlessUID() int
- func GetSubIDMappings(user, group string) ([]specs.LinuxIDMapping, []specs.LinuxIDMapping, error)
- func HasCapSysAdmin() (bool, error)
- func HomeDir() (string, error)
- func IsRootless() bool
- func ParseIDMappings(uidmap, gidmap []string) ([]idtools.IDMap, []idtools.IDMap, error)
- type Runnable
Constants ¶
View Source
const (
// UsernsEnvName is the environment variable, if set indicates in rootless mode
UsernsEnvName = "_CONTAINERS_USERNS_CONFIGURED"
)
Variables ¶
This section is empty.
Functions ¶
func GetHostIDMappings ¶
GetHostIDMappings reads mappings for the specified process (or the current process if pid is "self" or an empty string) from the kernel.
func GetRootlessGID ¶
func GetRootlessGID() int
GetRootlessGID returns the GID of the user in the parent userNS
func GetRootlessUID ¶
func GetRootlessUID() int
GetRootlessUID returns the UID of the user in the parent userNS
func GetSubIDMappings ¶
GetSubIDMappings reads mappings from /etc/subuid and /etc/subgid.
func HasCapSysAdmin ¶
HasCapSysAdmin returns whether the current process has CAP_SYS_ADMIN.
Types ¶
Click to show internal directories.
Click to hide internal directories.