seccomp

package
v1.21.7 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config is the global seccomp configuration type

func New

func New() *Config

New creates a new default seccomp configuration instance

func (*Config) IsDisabled

func (c *Config) IsDisabled() bool

IsDisabled returns true if seccomp is disabled either via the missing `seccomp` buildtag or globally by the system.

func (*Config) LoadProfile

func (c *Config) LoadProfile(profilePath string) error

LoadProfile can be used to load a seccomp profile from the provided path. This method will not fail if seccomp is disabled.

func (*Config) Profile

func (c *Config) Profile() *seccomp.Seccomp

Profile returns the currently loaded seccomp profile

func (*Config) SetDefaultWhenEmpty added in v1.19.4

func (c *Config) SetDefaultWhenEmpty()

Set the seccomp config to use default profile when the profile is empty

func (*Config) Setup added in v1.21.0

func (c *Config) Setup(
	ctx context.Context,
	specGenerator *generate.Generator,
	profileField *types.SecurityProfile,
	profilePath string,
) error

Setup can be used to setup the seccomp profile.

func (*Config) UseDefaultWhenEmpty added in v1.19.4

func (c *Config) UseDefaultWhenEmpty() bool

Returns whether the seccomp config is set to use default profile when the profile is empty

Jump to

Keyboard shortcuts

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