1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:47:34 +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:
Andreas Kling 2019-12-06 18:38:36 +01:00
parent 6e6e0b9de8
commit 23e802518d
10 changed files with 72 additions and 12 deletions

View file

@ -29,6 +29,7 @@ public:
virtual bool can_write(const FileDescription&) const override;
virtual ssize_t sendto(FileDescription&, const void*, size_t, int, const sockaddr*, socklen_t) override;
virtual ssize_t recvfrom(FileDescription&, void*, size_t, int flags, sockaddr*, socklen_t*) override;
virtual KResult getsockopt(FileDescription&, int level, int option, void*, socklen_t*) override;
private:
explicit LocalSocket(int type);