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
commit 367bb9e4eb
Notes: sideshowbarker 2024-07-19 14:59:26 +09:00
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);