diff options
author | Max Kellermann <max@duempel.org> | 2008-10-30 18:03:18 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-30 18:03:18 +0100 |
commit | 4d72bda4c3a6dc9ae774c6bf664e42090360dc7e (patch) | |
tree | e6bfe2681e524eed4ec4ebb763905c6e09a23fb3 /src | |
parent | 9ec695559fed11acf6123db3cf350ad7206be34c (diff) |
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 'src')
-rw-r--r-- | src/listen.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/listen.c b/src/listen.c index ae262806..00a21b81 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 |