mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-06-10 03:03:15 -04:00
server: wl_client: introduce method for getting client security context
Introduces a function wl_client_get_security_context for obtaining the security context of a connected client by using SO_PEERSEC on supported systems. Returns NULL for unsupported systems (inline with behaviour of e.g. Linux attempting to get a security context for a client that does not exist, which is a valid state). Signed-off-by: Rahul Sandhu <nvraxn@gmail.com>
This commit is contained in:
parent
1ab6b693b1
commit
5ed36d2b44
4 changed files with 74 additions and 0 deletions
|
|
@ -35,6 +35,9 @@ wl_os_socket_cloexec(int domain, int type, int protocol);
|
|||
int
|
||||
wl_os_socket_peercred(int sockfd, uid_t *uid, gid_t *gid, pid_t *pid);
|
||||
|
||||
int
|
||||
wl_os_socket_peersec(int sockfd, char **security_context);
|
||||
|
||||
int
|
||||
wl_os_dupfd_cloexec(int fd, int minfd);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue