passt: Make UNIX domain socket world-writable and world-readable

...save a chmod every time passt is started.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-04-13 22:09:37 +02:00
parent 4aa8e54a30
commit 0abec0eb60

View file

@ -42,6 +42,7 @@
#include <linux/rtnetlink.h> #include <linux/rtnetlink.h>
#include <time.h> #include <time.h>
#include <syslog.h> #include <syslog.h>
#include <sys/stat.h>
#include "passt.h" #include "passt.h"
#include "arp.h" #include "arp.h"
@ -80,6 +81,10 @@ static int sock_unix(void)
perror("UNIX socket bind"); perror("UNIX socket bind");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
chmod(UNIX_SOCK_PATH,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
return fd; return fd;
} }