capability

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2022 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CAPStringsList = []string{
	"CAP_CHOWN",
	"CAP_DAC_OVERRIDE",
	"CAP_DAC_READ_SEARCH",
	"CAP_FOWNER",
	"CAP_FSETID",
	"CAP_KILL",
	"CAP_SETGID",
	"CAP_SETUID",
	"CAP_SETPCAP",
	"CAP_LINUX_IMMUTABLE",
	"CAP_NET_BIND_SERVICE",
	"CAP_NET_BROADCAST",
	"CAP_NET_ADMIN",
	"CAP_NET_RAW",
	"CAP_IPC_LOCK",
	"CAP_IPC_OWNER",
	"CAP_SYS_MODULE",
	"CAP_SYS_RAWIO",
	"CAP_SYS_CHROOT",
	"CAP_SYS_PTRACE",
	"CAP_SYS_PACCT",
	"CAP_SYS_ADMIN",
	"CAP_SYS_BOOT",
	"CAP_SYS_NICE",
	"CAP_SYS_RESOURCE",
	"CAP_SYS_TIME",
	"CAP_SYS_TTY_CONFIG",
	"CAP_MKNOD",
	"CAP_LEASE",
	"CAP_AUDIT_WRITE",
	"CAP_AUDIT_CONTROL",
	"CAP_SETFCAP",
	"CAP_MAC_OVERRIDE",
	"CAP_MAC_ADMIN",
	"CAP_SYSLOG",
	"CAP_WAKE_ALARM",
	"CAP_BLOCK_SUSPEND",
	"CAP_AUDIT_READ",
	"CAP_PERFMON",
	"CAP_BPF",
	"CAP_CHECKPOINT_RESTORE",
}

CAPStringsList cap strings with order

View Source
var CAP_AUDIT_CONTROL = 30
View Source
var CAP_AUDIT_READ = 37
View Source
var CAP_AUDIT_WRITE = 29
View Source
var CAP_BLOCK_SUSPEND = 36
View Source
var CAP_BPF = 39

* CAP_BPF allows the following BPF operations: * - Creating all types of BPF maps * - Advanced verifier features * - Indirect variable access * - Bounded loops * - BPF to BPF function calls * - Scalar precision tracking * - Larger complexity limits * - Dead code elimination * - And potentially other features * - Loading BPF Type Format (BTF) data * - Retrieve xlated and JITed code of BPF programs * - Use bpf_spin_lock() helper * * CAP_PERFMON relaxes the verifier checks further: * - BPF progs can use of pointer-to-integer conversions * - speculation attack hardening measures are bypassed * - bpf_probe_read to read arbitrary kernel memory is allowed * - bpf_trace_printk to print kernel memory is allowed * * CAP_SYS_ADMIN is required to use bpf_probe_write_user. * * CAP_SYS_ADMIN is required to iterate system wide loaded * programs, maps, links, BTFs and convert their IDs to file descriptors. * * CAP_PERFMON and CAP_BPF are required to load tracing programs. * CAP_NET_ADMIN and CAP_BPF are required to load networking programs.

View Source
var CAP_CHECKPOINT_RESTORE = 40
View Source
var CAP_CHOWN = 0
View Source
var CAP_DAC_OVERRIDE = 1
View Source
var CAP_DAC_READ_SEARCH = 2
View Source
var CAP_FOWNER = 3
View Source
var CAP_FSETID = 4
View Source
var CAP_IPC_LOCK = 14
View Source
var CAP_IPC_OWNER = 15
View Source
var CAP_KILL = 5
View Source
var CAP_LEASE = 28
View Source
var CAP_LINUX_IMMUTABLE = 9
View Source
var CAP_MAC_ADMIN = 33
View Source
var CAP_MAC_OVERRIDE = 32
View Source
var CAP_MKNOD = 27
View Source
var CAP_NET_ADMIN = 12
View Source
var CAP_NET_BIND_SERVICE = 10
View Source
var CAP_NET_BROADCAST = 11
View Source
var CAP_NET_RAW = 13
View Source
var CAP_PERFMON = 38
View Source
var CAP_SETFCAP = 31
View Source
var CAP_SETGID = 6
View Source
var CAP_SETPCAP = 8
View Source
var CAP_SETUID = 7
View Source
var CAP_SYSLOG = 34
View Source
var CAP_SYS_ADMIN = 21
View Source
var CAP_SYS_BOOT = 22
View Source
var CAP_SYS_CHROOT = 18
View Source
var CAP_SYS_MODULE = 16

Insert and remove kernel modules - modify kernel without limit

View Source
var CAP_SYS_NICE = 23
View Source
var CAP_SYS_PACCT = 20
View Source
var CAP_SYS_PTRACE = 19
View Source
var CAP_SYS_RAWIO = 17
View Source
var CAP_SYS_RESOURCE = 24
View Source
var CAP_SYS_TIME = 25
View Source
var CAP_SYS_TTY_CONFIG = 26
View Source
var CAP_WAKE_ALARM = 35
View Source
var DockerDefaultCaps = []string{
	"CAP_CHOWN",
	"CAP_DAC_OVERRIDE",
	"CAP_FOWNER",
	"CAP_FSETID",
	"CAP_KILL",
	"CAP_SETGID",
	"CAP_SETUID",
	"CAP_SETPCAP",
	"CAP_NET_BIND_SERVICE",
	"CAP_NET_RAW",
	"CAP_SYS_CHROOT",
	"CAP_MKNOD",
	"CAP_AUDIT_WRITE",
	"CAP_SETFCAP",
}

Functions

func CapHexParser

func CapHexParser(capHex string) ([]string, error)

func CapHexToText

func CapHexToText(capHex string) string

func CapListToString added in v1.0.2

func CapListToString(lst []string) string

Types

type Cap

type Cap struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL