aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mds.c b/src/mds.c
index 84747b3..ef89445 100644
--- a/src/mds.c
+++ b/src/mds.c
@@ -190,8 +190,8 @@ int main(int argc_, char** argv_)
unlink(pathname);
fail_if ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0);
fail_if (fchmod(fd, S_IRWXU) < 0);
+ fail_if (fchown(fd, getuid(), NOBODY_GROUP_GID) < 0);
fail_if (bind(fd, (struct sockaddr*)(&address), sizeof(address)) < 0);
- fail_if (chown(pathname, getuid(), NOBODY_GROUP_GID) < 0); /* XXX Isn't fchmod one line earlier better? */
/* Start listening on socket. */
fail_if (listen(fd, SOMAXCONN) < 0);