mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
Kernel: Add getsockopt(SO_PEERCRED) for local sockets
This sockopt gives you a struct with the PID, UID and GID of a socket's peer process.
This commit is contained in:
parent
6e6e0b9de8
commit
23e802518d
10 changed files with 72 additions and 12 deletions
|
@ -361,10 +361,10 @@ KResult IPv4Socket::setsockopt(int level, int option, const void* value, socklen
|
|||
}
|
||||
}
|
||||
|
||||
KResult IPv4Socket::getsockopt(int level, int option, void* value, socklen_t* value_size)
|
||||
KResult IPv4Socket::getsockopt(FileDescription& description, int level, int option, void* value, socklen_t* value_size)
|
||||
{
|
||||
if (level != IPPROTO_IP)
|
||||
return Socket::getsockopt(level, option, value, value_size);
|
||||
return Socket::getsockopt(description, level, option, value, value_size);
|
||||
|
||||
switch (option) {
|
||||
case IP_TTL:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue