mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
LibIPC: Add setters for overriding the client/server PID if needed
Since SO_PEERCRED can only tell us who originally accepted the socket on the other side, we'll sometimes need to negotiate PID info manually.
This commit is contained in:
parent
6bc40b20b8
commit
ed351c7493
Notes:
sideshowbarker
2024-07-19 05:28:05 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/ed351c74937
2 changed files with 4 additions and 0 deletions
|
@ -198,7 +198,9 @@ public:
|
|||
}
|
||||
|
||||
int client_id() const { return m_client_id; }
|
||||
|
||||
pid_t client_pid() const { return m_client_pid; }
|
||||
void set_client_pid(pid_t pid) { m_client_pid = pid; }
|
||||
|
||||
virtual void die() = 0;
|
||||
|
||||
|
|
|
@ -75,6 +75,8 @@ public:
|
|||
virtual void handshake() = 0;
|
||||
|
||||
pid_t server_pid() const { return m_server_pid; }
|
||||
void set_server_pid(pid_t pid) { m_server_pid = pid; }
|
||||
|
||||
void set_my_client_id(int id) { m_my_client_id = id; }
|
||||
int my_client_id() const { return m_my_client_id; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue