Skip to content

Commit

Permalink
Merge pull request #1450 from vrothberg/sgid-non-numeric
Browse files Browse the repository at this point in the history
libcontainer/user: add supplementary groups only for non-numeric users
  • Loading branch information
crosbymichael authored Jul 7, 2017
2 parents 51b501d + 7742113 commit 5c73abb
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 @@ -358,8 +358,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.
} else if len(groups) > 0 && uidErr != nil {
// Supplementary group ids only make sense if in the implicit form for non-numeric users.
user.Sgids = make([]int, len(groups))
for i, group := range groups {
user.Sgids[i] = group.Gid
Expand Down

0 comments on commit 5c73abb

Please sign in to comment.