mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
*: transition to new libcontainer/user API
This patch fixes the compilation errors in Docker due to changes in the libcontainer/user API. There is no functionality change due to this patch. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
This commit is contained in:
parent
a10cca257f
commit
3ac4aa0d6b
1 changed files with 5 additions and 1 deletions
|
@ -1370,7 +1370,11 @@ func ServeFd(addr string, handle http.Handler) error {
|
|||
}
|
||||
|
||||
func lookupGidByName(nameOrGid string) (int, error) {
|
||||
groups, err := user.ParseGroupFilter(func(g *user.Group) bool {
|
||||
groupFile, err := user.GetGroupFile()
|
||||
if err != nil {
|
||||
return -1, err
|
||||
}
|
||||
groups, err := user.ParseGroupFileFilter(groupFile, func(g user.Group) bool {
|
||||
return g.Name == nameOrGid || strconv.Itoa(g.Gid) == nameOrGid
|
||||
})
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue