]> mj.ucw.cz Git - subauth.git/commitdiff
Server: Set correct permissions for the socket
authorMartin Mares <mj@ucw.cz>
Sun, 6 Aug 2017 20:04:25 +0000 (22:04 +0200)
committerMartin Mares <mj@ucw.cz>
Sun, 6 Aug 2017 20:04:25 +0000 (22:04 +0200)
server/subauthd.c

index f04541d22a4e08b5a2f2ff4c3eb34a5397c70f06..393c8342031b91a9aaa4a06e67bf7c1bab04a8c9 100644 (file)
@@ -277,6 +277,9 @@ static void init_socket(void)
   listen_socket.read_handler = listen_read_handler;
   file_add(&listen_socket);
 
+  if (chmod(socket_path, 0666) < 0)
+    die("Cannot chmod socket: %m");
+
   msg(L_INFO, "Listening on %s", socket_path);
 }