Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Actions ¶
func Actions() []string
Actions returns a sorted list of seccomp actions like []string{"allow", "errno", "kill", "log", "trace", "trap"}.
func MockActions ¶
func MockActions(actions []string) (restore func())
func MockCompilerVersionInfo ¶
func MockCompilerVersionInfo(versionInfo string) (restore func())
MockCompilerVersionInfo mocks the return value of CompilerVersionInfo.
func SupportsAction ¶
Types ¶
type BuildTimeRequirementError ¶
BuildTimeRequirementError represents the error case of a feature that cannot be supported because of unfulfilled build time requirements.
func (*BuildTimeRequirementError) Error ¶
func (e *BuildTimeRequirementError) Error() string
func (*BuildTimeRequirementError) RequirementsString ¶
func (e *BuildTimeRequirementError) RequirementsString() string
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
func NewCompiler ¶
NewCompiler returns a wrapper for the compiler binary. The path to the binary is looked up using the lookupTool helper.
func (*Compiler) Compile ¶
Compile compiles given source profile and saves the result to the out location.
func (*Compiler) VersionInfo ¶
func (c *Compiler) VersionInfo() (VersionInfo, error)
VersionInfo returns the version information of the compiler. The format of version information is: <build-id> <libseccomp-version> <hash> <features>. Where, the hash is calculated over all syscall names supported by the libseccomp library.
type VersionInfo ¶
type VersionInfo string
VersionInfo represents information about the seccomp compiler
func CompilerVersionInfo ¶
func CompilerVersionInfo(lookupTool func(name string) (string, error)) (VersionInfo, error)
CompilerVersionInfo returns the version information of snap-seccomp looked up via lookupTool.
func (VersionInfo) Features ¶
func (vi VersionInfo) Features() (string, error)
Features parses the output of VersionInfo and provides the golang seccomp features
func (VersionInfo) HasFeature ¶
func (vi VersionInfo) HasFeature(feature string) (bool, error)
HasFeature parses the output of VersionInfo and answers whether or not golang-seccomp supports the feature
func (VersionInfo) LibseccompVersion ¶
func (vi VersionInfo) LibseccompVersion() (string, error)
LibseccompVersion parses VersionInfo and provides the libseccomp version
func (VersionInfo) SupportsRobustArgumentFiltering ¶
func (vi VersionInfo) SupportsRobustArgumentFiltering() error
SupportsRobustArgumentFiltering parses the output of VersionInfo and determines if libseccomp and golang-seccomp are new enough to support robust argument filtering