Skip to content

Commit

Permalink
AdditionalGids must include effective group ID
Browse files Browse the repository at this point in the history
cherry-pick moby commit:
moby/moby@e44d7f7

Signed-off-by: Rudy Zhang <[email protected]>
  • Loading branch information
rudyfly authored and cardyok committed Nov 7, 2022
1 parent 3cad3d6 commit 11b7f1e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"strings"

"github.com/alibaba/pouch/pkg/log"

"github.com/opencontainers/runc/libcontainer/user"
)

Expand Down Expand Up @@ -61,7 +62,8 @@ func Get(passwdPath, groupPath, username string, groups []string) (uint32, uint3
uid := uint32(execUser.Uid)
gid := uint32(execUser.Gid)
sgids := append(execUser.Sgids, addGroups...)
var additionalGids []uint32

additionalGids := []uint32{gid}
for _, g := range sgids {
additionalGids = append(additionalGids, uint32(g))
}
Expand Down

0 comments on commit 11b7f1e

Please sign in to comment.