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.
This commit is contained in:
Max Kellermann 2008-10-30 18:03:18 +01:00
parent 9ec695559f
commit 4d72bda4c3
1 changed files with 4 additions and 0 deletions

View File

@ -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