mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
pipewire: add PW_KEY_SEC_SOCKET and set it in protocol
Add client key PW_KEY_SEC_SOCKET that indicates which socket the client used to connect to the server. This can be used by other modules as an access control mechanism.
This commit is contained in:
parent
72462ebd07
commit
bb120a070f
3 changed files with 5 additions and 0 deletions
|
|
@ -578,6 +578,8 @@ static struct client_data *client_new(struct server *s, int fd)
|
|||
if (props == NULL)
|
||||
goto exit;
|
||||
|
||||
pw_properties_set(props, PW_KEY_SEC_SOCKET, s->socket_info.name);
|
||||
|
||||
#if defined(__linux__)
|
||||
len = sizeof(ucred);
|
||||
if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &ucred, &len) < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue