Browse code

*: 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)

Aleksa Sarai authored on 2014/11/08 07:58:39
Showing 1 changed files
... ...
@@ -1370,7 +1370,11 @@ func ServeFd(addr string, handle http.Handler) error {
1370 1370
 }
1371 1371
 
1372 1372
 func lookupGidByName(nameOrGid string) (int, error) {
1373
-	groups, err := user.ParseGroupFilter(func(g *user.Group) bool {
1373
+	groupFile, err := user.GetGroupFile()
1374
+	if err != nil {
1375
+		return -1, err
1376
+	}
1377
+	groups, err := user.ParseGroupFileFilter(groupFile, func(g user.Group) bool {
1374 1378
 		return g.Name == nameOrGid || strconv.Itoa(g.Gid) == nameOrGid
1375 1379
 	})
1376 1380
 	if err != nil {