mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 18:28:10 +00:00
LibCore: Stop making the RPC sockets go=rw
Now that we can fchmod() on a pre-bind() socket, use that to lock down the RPC sockets we publish in all CEventLoop-driven programs.
This commit is contained in:
parent
15b57488d9
commit
e76e533a69
1 changed files with 6 additions and 0 deletions
|
@ -84,6 +84,12 @@ bool CLocalServer::listen(const String& address)
|
|||
#endif
|
||||
ASSERT(m_fd >= 0);
|
||||
|
||||
rc = fchmod(m_fd, 0600);
|
||||
if (rc < 0) {
|
||||
perror("fchmod");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
auto socket_address = CSocketAddress::local(address);
|
||||
auto un = socket_address.to_sockaddr_un();
|
||||
rc = ::bind(m_fd, (const sockaddr*)&un, sizeof(un));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue