Skip to content

Commit 3988452

Browse files
committed
Allow unshare(CLONE_NEWUSER|CLONE_NEWNS|CLONE_NEWUTS) syscall
This syscall is required for multiple usecases, one of them is buildah. See moby/moby#42441 Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
1 parent c936cc7 commit 3988452

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

seccomp/default_linux.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,34 @@ func DefaultProfile() *Seccomp {
646646
Arches: []string{"s390", "s390x"},
647647
},
648648
},
649+
{
650+
LinuxSyscall: specs.LinuxSyscall{
651+
Names: []string{
652+
"unshare",
653+
},
654+
Action: specs.ActAllow,
655+
Args: []specs.LinuxSeccompArg{
656+
{
657+
Index: 0,
658+
Value: unix.CLONE_NEWNS,
659+
ValueTwo: unix.CLONE_NEWNS,
660+
Op: specs.OpMaskedEqual,
661+
},
662+
{
663+
Index: 0,
664+
Value: unix.CLONE_NEWUTS,
665+
ValueTwo: unix.CLONE_NEWUTS,
666+
Op: specs.OpMaskedEqual,
667+
},
668+
{
669+
Index: 0,
670+
Value: unix.CLONE_NEWUTS,
671+
ValueTwo: unix.CLONE_NEWNS,
672+
Op: specs.OpMaskedEqual,
673+
},
674+
},
675+
},
676+
},
649677
{
650678
LinuxSyscall: specs.LinuxSyscall{
651679
Names: []string{

0 commit comments

Comments
 (0)