diff --git a/pkg/listeners/listeners_solaris.go b/pkg/listeners/listeners_solaris.go index 0482f3d732..c9003bcf68 100644 --- a/pkg/listeners/listeners_solaris.go +++ b/pkg/listeners/listeners_solaris.go @@ -22,10 +22,12 @@ func Init(proto, addr, socketGroup string, tlsConfig *tls.Config) (ls []net.List case "unix": gid, err := lookupGID(socketGroup) if err != nil { - if socketGroup != defaultSocketGroup { - return nil, err + if socketGroup != "" { + if socketGroup != defaultSocketGroup { + return nil, err + } + logrus.Warnf("could not change group %s to %s: %v", addr, defaultSocketGroup, err) } - logrus.Warnf("could not change group %s to %s: %v", addr, defaultSocketGroup, err) gid = os.Getgid() } l, err := sockets.NewUnixSocket(addr, gid) diff --git a/pkg/listeners/listeners_unix.go b/pkg/listeners/listeners_unix.go index 23ead610bf..25c98fba17 100644 --- a/pkg/listeners/listeners_unix.go +++ b/pkg/listeners/listeners_unix.go @@ -35,10 +35,12 @@ func Init(proto, addr, socketGroup string, tlsConfig *tls.Config) ([]net.Listene case "unix": gid, err := lookupGID(socketGroup) if err != nil { - if socketGroup != defaultSocketGroup { - return nil, err + if socketGroup != "" { + if socketGroup != defaultSocketGroup { + return nil, err + } + logrus.Warnf("could not change group %s to %s: %v", addr, defaultSocketGroup, err) } - logrus.Warnf("could not change group %s to %s: %v", addr, defaultSocketGroup, err) gid = os.Getgid() } l, err := sockets.NewUnixSocket(addr, gid)