mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-27 20:48:11 +00:00
Support none
as capabilities.
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
parent
d504afe479
commit
b046618027
@ -309,7 +309,11 @@ func ConfigInspectToOCI(image *MobyImage, inspect types.ImageInspect) ([]byte, e
|
|||||||
namespaces = append(namespaces, specs.LinuxNamespace{Type: specs.MountNamespace})
|
namespaces = append(namespaces, specs.LinuxNamespace{Type: specs.MountNamespace})
|
||||||
|
|
||||||
caps := image.Capabilities
|
caps := image.Capabilities
|
||||||
if len(caps) == 1 && strings.ToLower(caps[0]) == "all" {
|
if len(caps) == 1 {
|
||||||
|
switch cap := strings.ToLower(caps[0]); cap {
|
||||||
|
case "none":
|
||||||
|
caps = []string{}
|
||||||
|
case "all":
|
||||||
caps = []string{
|
caps = []string{
|
||||||
"CAP_AUDIT_CONTROL",
|
"CAP_AUDIT_CONTROL",
|
||||||
"CAP_AUDIT_READ",
|
"CAP_AUDIT_READ",
|
||||||
@ -351,6 +355,7 @@ func ConfigInspectToOCI(image *MobyImage, inspect types.ImageInspect) ([]byte, e
|
|||||||
"CAP_WAKE_ALARM",
|
"CAP_WAKE_ALARM",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
oci.Version = specs.Version
|
oci.Version = specs.Version
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user