Skip to content

Commit 48a1fca

Browse files
authored
Merge pull request #3314 from KentaTada/fix-clone-seccomp-cgroupns
Fix seccomp contributed profile for clone syscall
2 parents 2ec2089 + 5b9a43d commit 48a1fca

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

contrib/seccomp/seccomp_default.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ package seccomp
2020

2121
import (
2222
"runtime"
23-
"syscall"
23+
24+
"golang.org/x/sys/unix"
2425

2526
"github.com/opencontainers/runtime-spec/specs-go"
2627
)
@@ -555,7 +556,7 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp {
555556
Args: []specs.LinuxSeccompArg{
556557
{
557558
Index: 1,
558-
Value: syscall.CLONE_NEWNS | syscall.CLONE_NEWUTS | syscall.CLONE_NEWIPC | syscall.CLONE_NEWUSER | syscall.CLONE_NEWPID | syscall.CLONE_NEWNET,
559+
Value: unix.CLONE_NEWNS | unix.CLONE_NEWUTS | unix.CLONE_NEWIPC | unix.CLONE_NEWUSER | unix.CLONE_NEWPID | unix.CLONE_NEWNET | unix.CLONE_NEWCGROUP,
559560
ValueTwo: 0,
560561
Op: specs.OpMaskedEqual,
561562
},
@@ -570,7 +571,7 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp {
570571
Args: []specs.LinuxSeccompArg{
571572
{
572573
Index: 0,
573-
Value: syscall.CLONE_NEWNS | syscall.CLONE_NEWUTS | syscall.CLONE_NEWIPC | syscall.CLONE_NEWUSER | syscall.CLONE_NEWPID | syscall.CLONE_NEWNET,
574+
Value: unix.CLONE_NEWNS | unix.CLONE_NEWUTS | unix.CLONE_NEWIPC | unix.CLONE_NEWUSER | unix.CLONE_NEWPID | unix.CLONE_NEWNET | unix.CLONE_NEWCGROUP,
574575
ValueTwo: 0,
575576
Op: specs.OpMaskedEqual,
576577
},

0 commit comments

Comments
 (0)