X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=lib%2Fsocket-util-unix.c;h=32f966d81fb91cd265f87903680be08148fcd5bc;hb=8f79bb4d3999d993424e9578342b4130d10a556c;hp=c56654e03d9670d7c566b6320f6a17e124e73a8d;hpb=2d5cfef8255e09eac16feb71eb3318b6302c7bea;p=cascardo%2Fovs.git diff --git a/lib/socket-util-unix.c b/lib/socket-util-unix.c index c56654e03..32f966d81 100644 --- a/lib/socket-util-unix.c +++ b/lib/socket-util-unix.c @@ -28,7 +28,7 @@ #include "fatal-signal.h" #include "random.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(socket_util_unix); @@ -259,10 +259,10 @@ free_sockaddr_un(int dirfd, const char *linkname) } /* Binds Unix domain socket 'fd' to a file with permissions 0700. */ -static int -bind_unix_socket(int fd, struct sockaddr *sun, socklen_t sun_len) +static int bind_unix_socket(int fd, struct sockaddr *sun, socklen_t sun_len) { - const mode_t mode = 0700; + const mode_t mode = 0770; /* Allow both user and group access. */ + if (LINUX) { /* On Linux, the fd's permissions become the file's permissions. * fchmod() does not affect other files, like umask() does. */