mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 22:37:14 +08:00
41edbeb25e
This is much like apparmor.IsEnabled() function and a nice helper. Signed-off-by: Jessica Frazelle <acidburn@docker.com>
25 lines
472 B
Go
25 lines
472 B
Go
// +build !linux !cgo !seccomp
|
|
|
|
package seccomp
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/opencontainers/runc/libcontainer/configs"
|
|
)
|
|
|
|
var ErrSeccompNotEnabled = errors.New("seccomp: config provided but seccomp not supported")
|
|
|
|
// Seccomp not supported, do nothing
|
|
func InitSeccomp(config *configs.Seccomp) error {
|
|
if config != nil {
|
|
return ErrSeccompNotEnabled
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// IsEnabled returns false, because it is not supported.
|
|
func IsEnabled() bool {
|
|
return false
|
|
}
|