Use fchmod instead of chmod for unix sockets to prevent TOCTTOU
This commit is contained in:
@@ -188,7 +188,7 @@ OneServerSocket::Open()
|
||||
/* allow everybody to connect */
|
||||
|
||||
if (!path.IsNull())
|
||||
chmod(path.c_str(), 0666);
|
||||
fchmod(_fd.Get(), 0666);
|
||||
#endif
|
||||
|
||||
/* register in the EventLoop */
|
||||
|
Reference in New Issue
Block a user