mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 03:29:49 +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:
parent
6e6e0b9de8
commit
23e802518d
Notes:
sideshowbarker
2024-07-19 10:57:21 +09:00
Author: https://github.com/awesomekling
Commit: 23e802518d
10 changed files with 72 additions and 12 deletions
|
@ -337,6 +337,7 @@ struct pollfd {
|
|||
#define SO_SNDTIMEO 2
|
||||
#define SO_KEEPALIVE 3
|
||||
#define SO_ERROR 4
|
||||
#define SO_PEERCRED 5
|
||||
|
||||
#define IPPROTO_IP 0
|
||||
#define IPPROTO_ICMP 1
|
||||
|
@ -345,6 +346,12 @@ struct pollfd {
|
|||
|
||||
#define IP_TTL 2
|
||||
|
||||
struct ucred {
|
||||
pid_t pid;
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
};
|
||||
|
||||
struct sockaddr {
|
||||
u16 sa_family;
|
||||
char sa_data[14];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue