seccomp_unsupported.go 472 B

12345678910111213141516171819202122232425
  1. // +build !linux !cgo !seccomp
  2. package seccomp
  3. import (
  4. "errors"
  5. "github.com/opencontainers/runc/libcontainer/configs"
  6. )
  7. var ErrSeccompNotEnabled = errors.New("seccomp: config provided but seccomp not supported")
  8. // Seccomp not supported, do nothing
  9. func InitSeccomp(config *configs.Seccomp) error {
  10. if config != nil {
  11. return ErrSeccompNotEnabled
  12. }
  13. return nil
  14. }
  15. // IsEnabled returns false, because it is not supported.
  16. func IsEnabled() bool {
  17. return false
  18. }