sysenv

package
v0.0.0-...-1bc8c79 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	SMDisabled        string          = "0"
	SeccompMNDisabled SeccompModeName = "disabled"
	SMStrict          string          = "1"
	SeccompMNStrict   SeccompModeName = "strict"
	SMFiltering       string          = "2"
	SeccompMFiltering SeccompModeName = "filtering"
)

Variables

View Source
var DefaultCapStrings = map[string]struct{}{
	capability.CAP_SETPCAP.String():          {},
	capability.CAP_MKNOD.String():            {},
	capability.CAP_AUDIT_WRITE.String():      {},
	capability.CAP_CHOWN.String():            {},
	capability.CAP_NET_RAW.String():          {},
	capability.CAP_DAC_OVERRIDE.String():     {},
	capability.CAP_FOWNER.String():           {},
	capability.CAP_FSETID.String():           {},
	capability.CAP_KILL.String():             {},
	capability.CAP_SETGID.String():           {},
	capability.CAP_SETUID.String():           {},
	capability.CAP_NET_BIND_SERVICE.String(): {},
	capability.CAP_SYS_CHROOT.String():       {},
	capability.CAP_SETFCAP.String():          {},
}

Functions

func Capabilities

func Capabilities(pid int) (map[string]struct{}, map[string]struct{}, error)

func HasContainerCgroups

func HasContainerCgroups() bool

func HasDSImageFlag

func HasDSImageFlag() bool

func HasDockerEnvPath

func HasDockerEnvPath() bool

func InContainer

func InContainer() bool

func InDSContainer

func InDSContainer() (bool, bool)

func IsDefaultCapSet

func IsDefaultCapSet(set map[string]struct{}) bool

func IsPrivileged

func IsPrivileged() bool

func WithAllCapabilities

func WithAllCapabilities() bool

Types

type SeccompModeName

type SeccompModeName string

func SeccompMode

func SeccompMode(pid int) (SeccompModeName, error)

Jump to

Keyboard shortcuts

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