diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-06-24 11:05:39 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2020-06-25 15:42:42 -0400 |
commit | 8bb986137b80aeb921de54ef820e3acce8032627 (patch) | |
tree | 35e622ff1911f82cbace6a6db0a8a2ec66ae24eb /cmd | |
parent | 2ad9dcc07e3062653e3da0c5639a837d3af8b99e (diff) | |
download | podman-8bb986137b80aeb921de54ef820e3acce8032627.tar.gz podman-8bb986137b80aeb921de54ef820e3acce8032627.tar.bz2 podman-8bb986137b80aeb921de54ef820e3acce8032627.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')
-rw-r--r-- | cmd/podman/common/specgen.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go index 26d18faf0..8c3b10a7c 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] |