set punchd socket file permissions to 0666

This commit is contained in:
Christian Ulrich 2020-07-28 00:18:27 +02:00
parent e8d06b5982
commit d1b104c666
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
1 changed files with 3 additions and 0 deletions

View File

@ -88,6 +88,9 @@ proc main() =
removeFile(PunchdSocket) removeFile(PunchdSocket)
let unixSocket = newAsyncSocket(AF_UNIX, SOCK_STREAM, IPPROTO_IP) let unixSocket = newAsyncSocket(AF_UNIX, SOCK_STREAM, IPPROTO_IP)
unixSocket.bindUnix(PunchdSocket) unixSocket.bindUnix(PunchdSocket)
setFilePermissions(PunchdSocket,
{fpUserRead, fpUserWrite, fpGroupRead, fpGroupWrite,
fpOthersRead, fpOthersWrite})
unixSocket.listen() unixSocket.listen()
asyncCheck handleUsers(unixSocket) asyncCheck handleUsers(unixSocket)
try: try: