From 1bf2f2d290840d857210ff787ed1ac3add9f2354 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald@gmail.com" Date: Sat, 3 May 2014 21:13:03 +0000 Subject: [PATCH] make unix domain socket 'public' --- src/socket_connection.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/socket_connection.c b/src/socket_connection.c index 481ff7942..42c9354a1 100644 --- a/src/socket_connection.c +++ b/src/socket_connection.c @@ -63,6 +63,8 @@ #include #include +#include + #ifdef USE_LAUNCHD #include "../3rdparty/launch.h" #endif @@ -476,7 +478,12 @@ int socket_connection_create_unix(char *path){ free(ds); return -1; } - + + // http://blog.henning.makholm.net/2008/06/unix-domain-socket-woes.html + // make socket accept from all clients + chmod(path, S_IRWXU | S_IRWXG | S_IRWXO); + // + if (listen (ds->fd, MAX_PENDING_CONNECTIONS)) { log_error( "Error on listen() ...(%s)\n", strerror(errno)); free(ds);