[pulseaudio-discuss] [PATCH 00/11] Introduce memfd support

Alexander Larsson alexl at redhat.com
Tue Sep 22 02:37:17 PDT 2015


On tis, 2015-09-22 at 08:39 +0200, Ahmed S. Darwish wrote:
> Hi Alex,

> > 
> > I'm currently making an update of the freedesktop and gnome
> > sdk/runtime, and I guess if a pulseaudio 7 comes out soon I can put
> > that in. However, I assume this is post-7 material?
> > 
> 
> v7 is indeed around the corner. Arun has just stated that it might
> be released "in a couple of days." [1]

I'll try to get that into the next freedesktop.org and gnome runtimes
then, although I'm not sure how important reving the client libs are in
general.

> For memfds, this is only the very first submission. Reviews by the
> PA maintainers, and a big number of further iterations resulting
> from such reviews, is warranted ;-)

So, PA8 then.

> So if I understood correctly, we can say that app_id
> `org.gnome.music`
> has access to permission CONNECT_PLAYBACK, and app_id
> `org.gnome.Audacity'
> has access to permissions CONNECT RECORD and CONNECT_PLAYBACK?
> 
> If so, this can work nicely with Wim's PA access control patch series
> posted here:
> 
>   http://article.gmane.org/gmane.comp.audio.pulseaudio.general/23282

Yeah, you have to make up some kind of id to give permissions on. So,
in the pulseaudio table you would have an in, based on say a sink name,
and you could then grant each "org.gnome.music" the permission
"PLAYBACK" or whatever. If you want more generic permissions (not per-
device) you can just make up some id for that.

> > There is also some sample code here:
> >  http://cgit.freedesktop.org/xdg-app/xdg-app/tree/document-portal/x
> > dp-util.c#n283
> > Which looks up the xdg-app app-id for a dbus invocation which can
> > be
> > used as inspiration for how to do this in pulseaudio.
> > 
> 
> Hmmm .. commands sent from client to server (and vice versa) are done
> through the low-latency "srbchannel" mechanism these days: a shared
> ringbuffer + eventfds implementation; [2] no D-Bus is involved.
> 

Yeah, you can't use that code as is, but as long as you can get the
remote pid or remote cgroups list you can use the "bottom half" of it.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl at redhat.com            alexander.larsson at gmail.com 
He's a suave arachnophobic vampire hunter for the 21st century. She's a 
pregnant winged museum curator looking for love in all the wrong places. 
They fight crime! 




More information about the pulseaudio-discuss mailing list