summaryrefslogtreecommitdiff
path: root/cmd/podman/common/specgen.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-06-24 11:05:39 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-06-24 11:05:39 -0400
commit7330647cbd752274bd0b1826a24b68efd1cf5c1c (patch)
treeaf0386332bf4c3000cbe1e3c2639fb2245366cc4 /cmd/podman/common/specgen.go
parent6bc5dcc2829c2bc08923df0b50f71582d5558fe8 (diff)
downloadpodman-7330647cbd752274bd0b1826a24b68efd1cf5c1c.tar.gz
podman-7330647cbd752274bd0b1826a24b68efd1cf5c1c.tar.bz2
podman-7330647cbd752274bd0b1826a24b68efd1cf5c1c.zip
Fix inspect to display multiple label: changes
If the user runs a container like podman run --security-opt seccomp=unconfined --security-opt label=type:spc_t --security-opt label=level:s0 ... Podman inspect was only showing the second option This change will show "SecurityOpt": [ "label=type:spc_t,label=level:s0:c60", "seccomp=unconfined" ], Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/common/specgen.go')
-rw-r--r--cmd/podman/common/specgen.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go
index 599e003e8..f726cd474 100644
--- a/cmd/podman/common/specgen.go
+++ b/cmd/podman/common/specgen.go
@@ -520,7 +520,7 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string
case "label":
// TODO selinux opts and label opts are the same thing
s.ContainerSecurityConfig.SelinuxOpts = append(s.ContainerSecurityConfig.SelinuxOpts, con[1])
- s.Annotations[define.InspectAnnotationLabel] = con[1]
+ s.Annotations[define.InspectAnnotationLabel] = strings.Join(s.ContainerSecurityConfig.SelinuxOpts, ",label=")
case "apparmor":
s.ContainerSecurityConfig.ApparmorProfile = con[1]
s.Annotations[define.InspectAnnotationApparmor] = con[1]