Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config-linux: Make linux.seccomp.syscalls OPTIONAL #768

Merged
merged 1 commit into from
Apr 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion config-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,10 @@ The following parameters can be specified to setup seccomp:
* `SCMP_ARCH_PARISC`
* `SCMP_ARCH_PARISC64`

* **`syscalls`** *(array of objects, REQUIRED)* - match a syscall in seccomp.
* **`syscalls`** *(array of objects, OPTIONAL)* - match a syscall in seccomp.

While this property is OPTIONAL, some values of `defaultAction` are not useful without `syscalls` entries.
For example, if `defaultAction` is `SCMP_ACT_KILL` and `syscalls` is empty or unset, the kernel will kill the container process on its first syscall.

Each entry has the following structure:

Expand Down
5 changes: 4 additions & 1 deletion schema/config-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,10 @@
"$ref": "defs-linux.json#/definitions/Syscall"
}
}
}
},
"required": [
"defaultAction"
]
},
"sysctl": {
"id": "https://opencontainers.org/schema/bundle/linux/sysctl",
Expand Down
2 changes: 1 addition & 1 deletion specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ type WindowsNetworkResources struct {
type LinuxSeccomp struct {
DefaultAction LinuxSeccompAction `json:"defaultAction"`
Architectures []Arch `json:"architectures,omitempty"`
Syscalls []LinuxSyscall `json:"syscalls"`
Syscalls []LinuxSyscall `json:"syscalls,omitempty"`
}

// Arch used for additional architectures
Expand Down