This allows processes of different users to communicates each with the
other.
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>
+#include <sys/stat.h>
/**
* @file proto_unix.c
unix_server_to_addr(&pd->addr, server);
/* unlink(pd->addr.sun_path); */ /* TODO: What to do when the socket already exist? */
ret = bind(pd->socket, (struct sockaddr*)&pd->addr, sizeof(pd->addr));
+ chmod(pd->addr.sun_path, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
if (ret == -1) goto err;
port_desc->proto = &proto_unix;