diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-05-24 13:48:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-24 13:48:50 -0400 |
commit | eea7491d6b02893766b806775bf00c992a824fd2 (patch) | |
tree | 131f4e27cebc82ee86de3bc7165dec0ec6857946 /pkg/specgen/generate/security.go | |
parent | c6152f40a0d083a894b03ea18f1fabd1b4b68852 (diff) | |
parent | 5d37d80ff9783b2c811a06d80cd06fd6e338faf0 (diff) | |
download | podman-eea7491d6b02893766b806775bf00c992a824fd2.tar.gz podman-eea7491d6b02893766b806775bf00c992a824fd2.tar.bz2 podman-eea7491d6b02893766b806775bf00c992a824fd2.zip |
Merge pull request #14327 from rhatdan/common
Use containers/common/pkg/util.StringToSlice
Diffstat (limited to 'pkg/specgen/generate/security.go')
-rw-r--r-- | pkg/specgen/generate/security.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/specgen/generate/security.go b/pkg/specgen/generate/security.go index ec52164ab..7268ec318 100644 --- a/pkg/specgen/generate/security.go +++ b/pkg/specgen/generate/security.go @@ -7,6 +7,7 @@ import ( "github.com/containers/common/pkg/apparmor" "github.com/containers/common/pkg/capabilities" "github.com/containers/common/pkg/config" + cutil "github.com/containers/common/pkg/util" "github.com/containers/podman/v4/libpod" "github.com/containers/podman/v4/libpod/define" "github.com/containers/podman/v4/pkg/specgen" @@ -120,7 +121,7 @@ func securityConfigureGenerator(s *specgen.SpecGenerator, g *generate.Generator, // capabilities, required to run the container. var capsRequiredRequested []string for key, val := range s.Labels { - if util.StringInSlice(key, capabilities.ContainerImageLabels) { + if cutil.StringInSlice(key, capabilities.ContainerImageLabels) { capsRequiredRequested = strings.Split(val, ",") } } @@ -132,7 +133,7 @@ func securityConfigureGenerator(s *specgen.SpecGenerator, g *generate.Generator, } // Verify all capRequired are in the capList for _, cap := range capsRequired { - if !util.StringInSlice(cap, caplist) { + if !cutil.StringInSlice(cap, caplist) { privCapsRequired = append(privCapsRequired, cap) } } |