1
Fork 0
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:
Andreas Kling 2019-03-20 17:14:48 +01:00
parent bc1da7f1fd
commit 367bb9e4eb
4 changed files with 6 additions and 19 deletions

View file

@ -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);