From 334382a8c31285689f0b060de81b8f631d928970 Mon Sep 17 00:00:00 2001 From: Aidan Hobson Sayers Date: Fri, 13 Mar 2015 17:51:54 +0000 Subject: [PATCH] Allow a non-existent groupid to own the docker socket Signed-off-by: Aidan Hobson Sayers --- api/server/server.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/server/server.go b/api/server/server.go index 55dfe386f2..fbd2bcbe13 100644 --- a/api/server/server.go +++ b/api/server/server.go @@ -1457,6 +1457,11 @@ func lookupGidByName(nameOrGid string) (int, error) { if groups != nil && len(groups) > 0 { return groups[0].Gid, nil } + gid, err := strconv.Atoi(nameOrGid) + if err != nil { + log.Warnf("Could not find GID %d", gid) + return gid, nil + } return -1, fmt.Errorf("Group %s not found", nameOrGid) }