Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FSCONFIG_SET_FLAG = 0x0 FSCONFIG_SET_STRING = 0x1 FSCONFIG_SET_BINARY = 0x2 FSCONFIG_SET_PATH = 0x3 FSCONFIG_SET_PATH_EMPTY = 0x4 FSCONFIG_SET_FD = 0x5 FSCONFIG_CMD_CREATE = 0x6 FSCONFIG_CMD_RECONFIGURE = 0x7 )
Functions ¶
func Fsconfig ¶
Fsconfig is to call SYS_FSCONFIG syscall.
NOTE: It's based on https://go-review.googlesource.com/c/sys/+/398434.
func GetUsernsFD ¶
GetUsernsFD returns a userns file descriptor.
NOTE: It forks a short-live process without CLONE_FILES, which the process might hold the copied file descriptors in a short time.
Types ¶
type ProcIDMap ¶
type ProcIDMap = syscall.SysProcIDMap
ProcIDMap holds Container ID to Host ID mappings used for User Namespaces in Linux. It's alias to syscall.SysProcIDMap.
type ProcIDMaps ¶
type ProcIDMaps []ProcIDMap
func (ProcIDMaps) Marshal ¶
func (idMaps ProcIDMaps) Marshal() []byte
Marshal returns data in the /proc/{uid,gid}_map's format.
type ProcSyncType ¶
type ProcSyncType uint8
ProcSyncType is used for synchronisation between parent and child process during setup user namespace mappings.
const ( // ProcSyncReady is to notify parent that child is running with // pdeathsig and parent can start to write uid/gid maps. ProcSyncReady ProcSyncType = 1 // ProcSyncExit is to notify parent that the child is going to exit. ProcSyncExit ProcSyncType = 2 )
func (ProcSyncType) String ¶
func (typ ProcSyncType) String() string
String returns human-readable type.
Click to show internal directories.
Click to hide internal directories.