mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
Kernel: Encapsulate assignment of socket origin/acceptor credentials
This commit is contained in:
parent
242063866f
commit
7f96288535
3 changed files with 16 additions and 6 deletions
|
@ -62,9 +62,7 @@ KResultOr<SocketPair> LocalSocket::create_connected_pair(int type)
|
|||
socket->m_address.sun_family = AF_LOCAL;
|
||||
memcpy(socket->m_address.sun_path, "[socketpair]", 13);
|
||||
|
||||
auto& process = Process::current();
|
||||
socket->m_acceptor = { process.pid().value(), process.uid().value(), process.gid().value() };
|
||||
|
||||
socket->set_acceptor(Process::current());
|
||||
socket->set_connected(true);
|
||||
socket->set_connect_side_role(Role::Connected);
|
||||
socket->m_role = Role::Accepted;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue