mirror of
https://github.com/opencontainers/runc.git
synced 2025-09-27 03:46:19 +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:
10
features.go
10
features.go
@@ -59,10 +59,12 @@ var featuresCommand = cli.Command{
|
||||
|
||||
if seccomp.Enabled {
|
||||
feat.Linux.Seccomp = &features.Seccomp{
|
||||
Enabled: &tru,
|
||||
Actions: seccomp.KnownActions(),
|
||||
Operators: seccomp.KnownOperators(),
|
||||
Archs: seccomp.KnownArchs(),
|
||||
Enabled: &tru,
|
||||
Actions: seccomp.KnownActions(),
|
||||
Operators: seccomp.KnownOperators(),
|
||||
Archs: seccomp.KnownArchs(),
|
||||
KnownFlags: seccomp.KnownFlags(),
|
||||
SupportedFlags: seccomp.SupportedFlags(),
|
||||
}
|
||||
major, minor, patch := seccomp.Version()
|
||||
feat.Annotations[features.AnnotationLibseccompVersion] = fmt.Sprintf("%d.%d.%d", major, minor, patch)
|
||||
|
Reference in New Issue
Block a user