github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/mergeCode/runc/libcontainer/seccomp/seccomp_unsupported.go (about)

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