unixsock plugin: Actually set the permissions for the socket.
authorEvgeny Chukreev <akshaal@toril.ru>
Sun, 6 Jan 2008 09:00:06 +0000 (10:00 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Sun, 6 Jan 2008 09:00:06 +0000 (10:00 +0100)
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/unixsock.c

index 43e29c2..c7e0c44 100644 (file)
@@ -29,6 +29,7 @@
 #include <pthread.h>
 
 #include <sys/socket.h>
+#include <sys/stat.h>
 #include <sys/un.h>
 
 #include <grp.h>
@@ -365,6 +366,8 @@ static int us_open_socket (void)
                return (-1);
        }
 
+       chmod (sa.sun_path, sock_perms);
+
        status = listen (sock_fd, 8);
        if (status != 0)
        {