From 5e67bfa5eb821f2bbd3f223a45f729e5d9f1e14d Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sun, 10 May 2009 13:09:55 +0200 Subject: [PATCH] proto_unix: Set socket permission rw-rw-rw This allows processes of different users to communicates each with the other. --- src/proto_unix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/proto_unix.c b/src/proto_unix.c index d8b386d..edf8fbb 100644 --- a/src/proto_unix.c +++ b/src/proto_unix.c @@ -51,6 +51,7 @@ #include #include #include +#include /** * @file proto_unix.c @@ -212,6 +213,7 @@ forb_unix_port_init(struct forb_port_desc *port_desc, const forb_server_id *serv 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; -- 2.39.2