Skip to content

Commit 738bc4a

Browse files
author
Christian Weichel
committed
[seccomp-profile] Allow unshare(0) to make nsexec work
1 parent b7138a1 commit 738bc4a

File tree

1 file changed

+13
-0
lines changed
  • components/ws-daemon/seccomp-profile-installer

1 file changed

+13
-0
lines changed

components/ws-daemon/seccomp-profile-installer/main.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@ func main() {
5757
},
5858
},
5959
},
60+
// docker-exec requires unshare(0).
61+
specs.LinuxSyscall{
62+
Names: []string{"unshare"},
63+
Action: specs.ActAllow,
64+
Args: []specs.LinuxSeccompArg{
65+
{
66+
Index: 0,
67+
Op: specs.OpEqualTo,
68+
Value: 0,
69+
},
70+
},
71+
},
72+
6073
// slirp4netns requires setns, as do we for debugging
6174
// TODO(cw): find means to make this more precise, maybe an eBPF program that checks if
6275
// arg zero is a child of this netns. The kernel already does that (from the setns(2) man page):

0 commit comments

Comments
 (0)