srbchannel: Introduce per-client SHM files

The PA daemon currently uses a single SHM file for all clients
sending and receiving commands over the low-latency srbchannel
mechanism.

To avoid leaks between clients in that case, and to provide the
necessary ground work later for sandboxing and memfds, create the
srbchannel SHM files on a per-client basis.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
This commit is contained in:
Ahmed S. Darwish 2016-03-13 00:53:34 +02:00 committed by David Henningsson
parent 9bda6e344a
commit 211a520543
3 changed files with 27 additions and 17 deletions

View file

@ -177,10 +177,8 @@ struct pa_core {
PA_LLIST_HEAD(pa_subscription_event, subscription_event_queue);
pa_subscription_event *subscription_event_last;
/* The mempool is used for data we write to, it's readonly for the client.
The rw_mempool is used for data writable by both server and client (and
can be NULL in some cases). */
pa_mempool *mempool, *rw_mempool;
/* The mempool is used for data we write to, it's readonly for the client. */
pa_mempool *mempool;
/* Shared memory size, as specified either by daemon configuration
* or PA daemon defaults (~ 64 MiB). */