diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-07-22 15:38:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-22 15:38:42 +0200 |
commit | 80add2902cf3561d2c9f91dc045076519cd297d5 (patch) | |
tree | 2c9b51e5b32158c96142bef6168114380bf4260a /cmd | |
parent | 9f5d1462be20c86afe363750ecc20ee89e0b3978 (diff) | |
parent | 4c4a00f63ea5bc7956bf40be457bf86643575dce (diff) | |
download | podman-80add2902cf3561d2c9f91dc045076519cd297d5.tar.gz podman-80add2902cf3561d2c9f91dc045076519cd297d5.tar.bz2 podman-80add2902cf3561d2c9f91dc045076519cd297d5.zip |
Merge pull request #6992 from rhatdan/apparmor
Support default profile for apparmor
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/common/create.go | 2 | ||||
-rw-r--r-- | cmd/podman/common/specgen.go | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go index 46f78cdba..e248e621f 100644 --- a/cmd/podman/common/create.go +++ b/cmd/podman/common/create.go @@ -405,7 +405,7 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet { ) createFlags.StringArrayVar( &cf.SecurityOpt, - "security-opt", containerConfig.SecurityOptions(), + "security-opt", []string{}, "Security Options", ) createFlags.String( diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go index 731085731..e694317cc 100644 --- a/cmd/podman/common/specgen.go +++ b/cmd/podman/common/specgen.go @@ -512,10 +512,8 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string s.ContainerSecurityConfig.SelinuxOpts = append(s.ContainerSecurityConfig.SelinuxOpts, con[1]) s.Annotations[define.InspectAnnotationLabel] = strings.Join(s.ContainerSecurityConfig.SelinuxOpts, ",label=") case "apparmor": - if !c.Privileged { - s.ContainerSecurityConfig.ApparmorProfile = con[1] - s.Annotations[define.InspectAnnotationApparmor] = con[1] - } + s.ContainerSecurityConfig.ApparmorProfile = con[1] + s.Annotations[define.InspectAnnotationApparmor] = con[1] case "seccomp": s.SeccompProfilePath = con[1] s.Annotations[define.InspectAnnotationSeccomp] = con[1] |