mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libct/seccomp/patchbpf: support SPEC_ALLOW
Commit58ea21daefadded support for seccomp flags such as SPEC_ALLOW, but it does not work as expected, because since commit7a8d7162f9we do not use libseccomp-golang's Load(), but handle flags separately in patchbfp. This fixes setting SPEC_ALLOW flag. Add a comment to not forget to amend filterFlags when adding new flags. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -105,6 +105,7 @@ func InitSeccomp(config *configs.Seccomp) (int, error) {
|
||||
if err := filter.SetSSB(true); err != nil {
|
||||
return -1, fmt.Errorf("error adding SSB flag to seccomp filter: %w", err)
|
||||
}
|
||||
// NOTE when adding more flags, make sure to also modify filterFlags in patchbpf.
|
||||
default:
|
||||
return -1, fmt.Errorf("seccomp flags %q not yet supported by runc", flag)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user