Convert socket group to int

Sockets interface has been updated to take in a the group
id as an integer rather than a string.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: e5d77c64a2030fe4c5c1413b69b45f40a2347358
Component: engine
This commit is contained in:
Derek McGowan
2017-02-09 16:10:38 -05:00
committed by Brian Goff
parent a855d6e84c
commit 3f7b7dd1ae
@@ -31,7 +31,12 @@ func Init(proto, addr, socketGroup string, tlsConfig *tls.Config) ([]net.Listene
}
ls = append(ls, l)
case "unix":
l, err := sockets.NewUnixSocket(addr, socketGroup)
gid, err := strconv.Atoi(socketGroup)
if err != nil {
return nil, fmt.Errorf("failed to parse socket group id: should be a number: %v", socketGroup)
}
l, err := sockets.NewUnixSocket(addr, gid)
if err != nil {
return nil, fmt.Errorf("can't create unix socket %s: %v", addr, err)
}