mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #42681 from berrange/seccomp-clone3
seccomp: add support for "clone3" syscall in default policy
This commit is contained in:
commit
f07e53e0bb
2 changed files with 27 additions and 0 deletions
|
@ -553,6 +553,7 @@
|
|||
"names": [
|
||||
"bpf",
|
||||
"clone",
|
||||
"clone3",
|
||||
"fanotify_init",
|
||||
"fsconfig",
|
||||
"fsmount",
|
||||
|
@ -627,6 +628,18 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"names": [
|
||||
"clone3"
|
||||
],
|
||||
"action": "SCMP_ACT_ERRNO",
|
||||
"errnoRet": 38,
|
||||
"excludes": {
|
||||
"caps": [
|
||||
"CAP_SYS_ADMIN"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"names": [
|
||||
"reboot"
|
||||
|
|
|
@ -42,6 +42,7 @@ func arches() []Architecture {
|
|||
|
||||
// DefaultProfile defines the allowed syscalls for the default seccomp profile.
|
||||
func DefaultProfile() *Seccomp {
|
||||
nosys := uint(unix.ENOSYS)
|
||||
syscalls := []*Syscall{
|
||||
{
|
||||
LinuxSyscall: specs.LinuxSyscall{
|
||||
|
@ -546,6 +547,7 @@ func DefaultProfile() *Seccomp {
|
|||
Names: []string{
|
||||
"bpf",
|
||||
"clone",
|
||||
"clone3",
|
||||
"fanotify_init",
|
||||
"fsconfig",
|
||||
"fsmount",
|
||||
|
@ -615,6 +617,18 @@ func DefaultProfile() *Seccomp {
|
|||
Caps: []string{"CAP_SYS_ADMIN"},
|
||||
},
|
||||
},
|
||||
{
|
||||
LinuxSyscall: specs.LinuxSyscall{
|
||||
Names: []string{
|
||||
"clone3",
|
||||
},
|
||||
Action: specs.ActErrno,
|
||||
ErrnoRet: &nosys,
|
||||
},
|
||||
Excludes: &Filter{
|
||||
Caps: []string{"CAP_SYS_ADMIN"},
|
||||
},
|
||||
},
|
||||
{
|
||||
LinuxSyscall: specs.LinuxSyscall{
|
||||
Names: []string{
|
||||
|
|
Loading…
Add table
Reference in a new issue