Use fchmod instead of chmod for unix sockets to prevent TOCTTOU
This commit is contained in:
parent
2127a482da
commit
84054203af
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user