make unix domain socket 'public'

This commit is contained in:
matthias.ringwald@gmail.com 2014-05-03 21:13:03 +00:00
parent 4f3229d8d2
commit 1bf2f2d290

View File

@ -63,6 +63,8 @@
#include <sys/un.h>
#include <unistd.h>
#include <sys/stat.h>
#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);