mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 03:47:34 +00:00
Kernel: Remove ioctl for getting a socket peer's PID.
Now that everything is nice and mature, the WindowServer can just use the client PID it receives in the Greeting message, and we can get rid of this hacky ioctl. :^)
This commit is contained in:
parent
bc1da7f1fd
commit
367bb9e4eb
4 changed files with 6 additions and 19 deletions
|
@ -1939,13 +1939,6 @@ int Process::sys$ioctl(int fd, unsigned request, unsigned arg)
|
|||
auto* descriptor = file_descriptor(fd);
|
||||
if (!descriptor)
|
||||
return -EBADF;
|
||||
if (descriptor->is_socket() && request == 413) {
|
||||
auto* pid = (pid_t*)arg;
|
||||
if (!validate_write_typed(pid))
|
||||
return -EFAULT;
|
||||
*pid = descriptor->socket()->origin_pid();
|
||||
return 0;
|
||||
}
|
||||
if (!descriptor->is_device())
|
||||
return -ENOTTY;
|
||||
return descriptor->device()->ioctl(*this, request, arg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue