Skip to content

Commit

Permalink
user: Always return supplementary groups
Browse files Browse the repository at this point in the history
The caller can ignore it if they don't care about using them.

Signed-off-by: Mrunal Patel <[email protected]>
  • Loading branch information
mrunalp committed Oct 17, 2018
1 parent 58592df commit 46b41a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libcontainer/user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ func GetExecUser(userSpec string, defaults *ExecUser, passwd, group io.Reader) (

// Okay, so it's numeric. We can just roll with this.
}
} else if len(groups) > 0 {
// Supplementary group ids only make sense if in the implicit form.
}
if len(groups) > 0 {
user.Sgids = make([]int, len(groups))
for i, group := range groups {
user.Sgids[i] = group.Gid
Expand Down

0 comments on commit 46b41a3

Please sign in to comment.