From 5b9fcf5e521f053f7749fb27f426168a541a24ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 25 Jan 2016 08:17:57 +0100 Subject: [PATCH] Revert "Set sticky bit on socket" This reverts commit 15ae398ea51f9adb282d7cf93a998a8ea401fd21. Setting the sticky bit on a file is not really portable and causes more problems than it solves. The reason why this was done in the first place, is that the XDG Base Directory Specification states that files with the sticky bit set should not be touched by periodic cleanup procedures. Close #13 --- server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.c b/server.c index 8b4c9ba..78ccbe2 100644 --- a/server.c +++ b/server.c @@ -54,7 +54,7 @@ static int server_create_socket(const char *name) { int r = bind(fd, (struct sockaddr*)&sockaddr, socklen); umask(mask); - if (r == -1 || chmod(sockaddr.sun_path, S_ISVTX|S_IRUSR|S_IWUSR) == -1) { + if (r == -1) { close(fd); return -1; }