mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
shm: apply shm area permissions to shmpipe control socket
Apply shared memory area permissions to the control socket (more precisely, the path it is bound to) as well. https://bugzilla.gnome.org/show_bug.cgi?id=682775
This commit is contained in:
parent
49fefbde65
commit
2cacfa2932
1 changed files with 6 additions and 0 deletions
|
@ -235,6 +235,10 @@ sp_writer_create (const char *path, size_t size, mode_t perms)
|
|||
|
||||
self->socket_path = strdup (sock_un.sun_path);
|
||||
|
||||
if (chmod (self->socket_path, perms) < 0)
|
||||
RETURN_ERROR ("failed to set socket permissions (%d): %s\n", errno,
|
||||
strerror (errno));
|
||||
|
||||
if (listen (self->main_socket, LISTEN_BACKLOG) < 0)
|
||||
RETURN_ERROR ("listen() failed (%d): %s\n", errno, strerror (errno));
|
||||
|
||||
|
@ -445,6 +449,8 @@ sp_writer_setperms_shm (ShmPipe * self, mode_t perms)
|
|||
for (area = self->shm_area; area; area = area->next)
|
||||
ret |= fchmod (area->shm_fd, perms);
|
||||
|
||||
ret |= chmod (self->socket_path, perms);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue