summaryrefslogtreecommitdiff
path: root/libpod/container_internal_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-12 11:30:00 -0500
committerGitHub <noreply@github.com>2021-02-12 11:30:00 -0500
commit291f59600b7857bbec6f340d3ceec6e2e9ce923f (patch)
tree401aaa4e56cbe585582fa1124a9cd77a83ae21a9 /libpod/container_internal_linux.go
parent1b284a298c0bde20561321f325d4a7ad00e7bd25 (diff)
parent78c8a87362ee27ba1d2a62b7c9d73adc313c7d7e (diff)
downloadpodman-291f59600b7857bbec6f340d3ceec6e2e9ce923f.tar.gz
podman-291f59600b7857bbec6f340d3ceec6e2e9ce923f.tar.bz2
podman-291f59600b7857bbec6f340d3ceec6e2e9ce923f.zip
Merge pull request #9331 from Luap99/lint
Enable more golangci-lint linters
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r--libpod/container_internal_linux.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index 1c4537a27..a3476f42e 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -521,14 +521,14 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
}}
}
for _, gid := range execUser.Sgids {
- isGidAvailable := false
+ isGIDAvailable := false
for _, m := range gidMappings {
if gid >= m.ContainerID && gid < m.ContainerID+m.Size {
- isGidAvailable = true
+ isGIDAvailable = true
break
}
}
- if isGidAvailable {
+ if isGIDAvailable {
g.AddProcessAdditionalGid(uint32(gid))
} else {
logrus.Warnf("additional gid=%d is not present in the user namespace, skip setting it", gid)
@@ -1614,7 +1614,6 @@ func (c *Container) makeBindMounts() error {
return errors.Wrapf(err, "error setting timezone for container %s", c.ID())
}
c.state.BindMounts["/etc/localtime"] = localtimePath
-
}
}