Commit 84054203 authored by 1848's avatar 1848

Use fchmod instead of chmod for unix sockets to prevent TOCTTOU

parent 2127a482
......@@ -188,10 +188,10 @@ OneServerSocket::Open()
/* allow everybody to connect */
if (!path.IsNull())
chmod(path.c_str(), 0666);
fchmod(_fd.Get(), 0666);
#endif
/* register in the EventLoop */
/* register in the EventLoop */
SetFD(_fd.Release());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment