|
@@ -2386,6 +2386,14 @@ retry_listener_ports(smartlist_t *old_conns,
|
|
if (port->server_cfg.no_listen)
|
|
if (port->server_cfg.no_listen)
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
+#ifndef _WIN32
|
|
|
|
+ /* We don't need to be root to create a UNIX socket, so defer until after
|
|
|
|
+ * setuid. */
|
|
|
|
+ const or_options_t *options = get_options();
|
|
|
|
+ if (port->is_unix_addr && !geteuid() && strcmp(options->User, "root"))
|
|
|
|
+ continue;
|
|
|
|
+#endif
|
|
|
|
+
|
|
if (port->is_unix_addr) {
|
|
if (port->is_unix_addr) {
|
|
listensockaddr = (struct sockaddr *)
|
|
listensockaddr = (struct sockaddr *)
|
|
create_unix_sockaddr(port->unix_addr,
|
|
create_unix_sockaddr(port->unix_addr,
|