Enable stylecheck linter

Use the stylecheck linter and fix the reported problems.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
This commit is contained in:
Paul Holzinger
2021-02-11 14:15:26 +01:00
parent afe4ce6b1c
commit ef2fc90f2d
14 changed files with 40 additions and 38 deletions

View File

@ -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)