Skip to content

Commit

Permalink
libcontainer: honor seccomp defaultErrnoRet
Browse files Browse the repository at this point in the history
opencontainers/runtime-spec#1087 added support
for defaultErrnoRet to the OCI runtime specs.

If a defaultErrnoRet is specified, disable patching the generated
libseccomp cBPF.

Closes: opencontainers/runc#2943

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
  • Loading branch information
giuseppe committed May 17, 2021
1 parent 03318f2 commit 3bdf75a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libcontainer/configs/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ type IDMap struct {
// for syscalls. Additional architectures can be added by specifying them in
// Architectures.
type Seccomp struct {
DefaultAction Action `json:"default_action"`
Architectures []string `json:"architectures"`
Syscalls []*Syscall `json:"syscalls"`
DefaultAction Action `json:"default_action"`
Architectures []string `json:"architectures"`
Syscalls []*Syscall `json:"syscalls"`
DefaultErrnoRet *uint `json:"default_errno_ret"`
}

// Action is taken upon rule match in Seccomp
Expand Down

0 comments on commit 3bdf75a

Please sign in to comment.