Allow a non-existent groupid to own the docker socket
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net> Upstream-commit: 334382a8c31285689f0b060de81b8f631d928970 Component: engine
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user