Documentation ¶
Index ¶
- Constants
- func GetHostIDMappings(pid string) ([]specs.LinuxIDMapping, []specs.LinuxIDMapping, error)
- func GetRootlessUID() int
- func HasCapSysAdmin() (bool, error)
- func HomeDir() (string, error)
- func IsRootless() bool
- func MaybeReexecUsingUserNamespace(evenForRoot bool)
- func ParseIDMappings(uidmap, gidmap []string) ([]idtools.IDMap, []idtools.IDMap, error)
- func RootlessEnv() []string
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 GetRootlessUID ¶
func GetRootlessUID() int
GetRootlessUID returns the UID of the user in the parent userNS
func HasCapSysAdmin ¶ added in v1.30.0
HasCapSysAdmin returns whether the current process has CAP_SYS_ADMIN.
func MaybeReexecUsingUserNamespace ¶
func MaybeReexecUsingUserNamespace(evenForRoot bool)
MaybeReexecUsingUserNamespace re-exec the process in a new namespace
func ParseIDMappings ¶
ParseIDMappings parses mapping triples.
func RootlessEnv ¶
func RootlessEnv() []string
RootlessEnv returns the environment settings for the rootless containers
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.