Преглед на файлове

*: 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 преди 10 години
родител
ревизия
3ac4aa0d6b
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      api/server/server.go

+ 5 - 1
api/server/server.go

@@ -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 {