Documentation ¶
Index ¶
Constants ¶
View Source
const CAP_PRIVILEGED uint64 = 0x3ffffffff
ref: https://fossd.anu.edu.au/linux/latest/source/include/uapi/linux/capability.h Linux Kernel >= 3.5 (CentOS >= 7, Ubuntu >= 12.10) const CAP_PRIVILEGED uint64 = 0x1fffffffff Linux Kernal >= 2.6.25 (CentOS >= 6, Ubuntu >= 8.10)
View Source
const CAP_SYS_ADMIN uint64 = 1 << 21
View Source
const CAP_SYS_RESOURCE uint64 = 1 << 24
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kernel ¶
type Kernel interface {
List() []*KernelParam
}
func CurrentKernel ¶
func CurrentKernel() Kernel
type KernelParam ¶
func NewFileKernalParam ¶
func NewFileKernalParam(key, fileName string, defaultValue int, defaultIsMaxValue bool) *KernelParam
type RuntimePermission ¶
type RuntimePermission interface { // is running in container IsInContainer() bool // has privileged HasPrivileged() bool // has cap_sys_admin HasSysAdminPermission() bool // has sys mount permission HasSysMountPermission() bool HasSetOOMScorePermission() bool HasChrootPermission() bool }
var Permission RuntimePermission
Click to show internal directories.
Click to hide internal directories.