aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-30 18:03:18 +0100
committerMax Kellermann <max@duempel.org>2008-10-30 18:03:18 +0100
commit4d72bda4c3a6dc9ae774c6bf664e42090360dc7e (patch)
treee6bfe2681e524eed4ec4ebb763905c6e09a23fb3 /src
parent9ec695559fed11acf6123db3cf350ad7206be34c (diff)
downloadmpd-4d72bda4c3a6dc9ae774c6bf664e42090360dc7e.tar.gz
mpd-4d72bda4c3a6dc9ae774c6bf664e42090360dc7e.tar.xz
mpd-4d72bda4c3a6dc9ae774c6bf664e42090360dc7e.zip
listen: set file mode 666 on the unix socket
Depending on MPD's umask, the file permissions of the unix socket were too restrictive, and many clients were not able to connect. Do a chmod(0666) on the socket, to allow everybody to connect.
Diffstat (limited to '')
-rw-r--r--src/listen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/listen.c b/src/listen.c
index ae2628069..00a21b81b 100644
--- a/src/listen.c
+++ b/src/listen.c
@@ -176,6 +176,10 @@ static void parseListenConfigParam(unsigned int port, ConfigParam * param)
if (establishListen(PF_UNIX, addrp, addrlen) < 0)
FATAL("unable to bind to %s: %s\n",
param->value, strerror(errno));
+
+ /* allow everybody to connect */
+ chmod(param->value, 0666);
+
#endif /* HAVE_UN */
} else {
#ifdef HAVE_TCP