1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Allow a non-existent groupid to own the docker socket

Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
This commit is contained in:
Aidan Hobson Sayers 2015-03-13 17:51:54 +00:00
parent 6374c12fbb
commit 334382a8c3

View file

@ -1457,6 +1457,11 @@ func lookupGidByName(nameOrGid string) (int, error) {
if groups != nil && len(groups) > 0 { if groups != nil && len(groups) > 0 {
return groups[0].Gid, nil 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) return -1, fmt.Errorf("Group %s not found", nameOrGid)
} }