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:
parent
6374c12fbb
commit
334382a8c3
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue