summaryrefslogtreecommitdiff
path: root/src/net/SocketUtil.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/SocketUtil.cxx')
-rw-r--r--src/net/SocketUtil.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/net/SocketUtil.cxx b/src/net/SocketUtil.cxx
index de2c25917..42962c0eb 100644
--- a/src/net/SocketUtil.cxx
+++ b/src/net/SocketUtil.cxx
@@ -34,11 +34,10 @@ socket_bind_listen(int domain, int type, int protocol,
if (!fd.CreateNonBlock(domain, type, protocol))
throw MakeSocketError("Failed to create socket");
-
#ifdef HAVE_UN
if (domain == AF_UNIX) {
- /* allow everybody to connect */
- fchmod(fd.Get(), 0666);
+ /* Prevent access until right permissions are set */
+ fchmod(fd.Get(), 0);
}
#endif