Initial checkin from CRI-O repo

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
This commit is contained in:
Matthew Heon
2017-11-01 11:24:59 -04:00
parent 2b74391cd5
commit a031b83a09
3761 changed files with 1330512 additions and 0 deletions

View File

@ -0,0 +1,18 @@
package main
import (
"os"
"golang.org/x/sys/unix"
)
func main() {
// Check if Seccomp is supported, via CONFIG_SECCOMP.
if err := unix.Prctl(unix.PR_GET_SECCOMP, 0, 0, 0, 0); err != unix.EINVAL {
// Make sure the kernel has CONFIG_SECCOMP_FILTER.
if err := unix.Prctl(unix.PR_SET_SECCOMP, unix.SECCOMP_MODE_FILTER, 0, 0, 0); err != unix.EINVAL {
os.Exit(0)
}
}
os.Exit(1)
}