mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
runc features: add seccomp filter flags
Amend runc features to print seccomp flags. Two set of flags are added: * known flags are those that this version of runc is aware of; * supported flags are those that can be set; normally, this is the same set as known flags, but due to older version of kernel and/or libseccomp, some known flags might be unsupported. This commit also consolidates three different switch statements dealing with flags into one, in func setFlag. A note is added to this function telling what else to look for when adding new flags. Unfortunately, it also adds a list of known flags, that should be kept in sync with the switch statement. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -60,6 +60,16 @@ type Seccomp struct {
|
||||
// Archs is the list of the recognized archs, e.g., "SCMP_ARCH_X86_64".
|
||||
// Nil value means "unknown", not "no support for any arch".
|
||||
Archs []string `json:"archs,omitempty"`
|
||||
|
||||
// KnownFlags is the list of the recognized filter flags, e.g., "SECCOMP_FILTER_FLAG_LOG".
|
||||
// Nil value means "unknown", not "no flags are recognized".
|
||||
KnownFlags []string `json:"knownFlags,omitempty"`
|
||||
|
||||
// SupportedFlags is the list of the supported filter flags, e.g., "SECCOMP_FILTER_FLAG_LOG".
|
||||
// This list may be a subset of KnownFlags due to some flags
|
||||
// not supported by the current kernel and/or libseccomp.
|
||||
// Nil value means "unknown", not "no flags are supported".
|
||||
SupportedFlags []string `json:"supportedFlags,omitempty"`
|
||||
}
|
||||
|
||||
// Apparmor represents the "apparmor" field.
|
||||
|
||||
Reference in New Issue
Block a user