Skip to content
  • Sergio Costas's avatar
    client access: add support for snap permissions · 2ec202df
    Sergio Costas authored and George Kiagiadakis's avatar George Kiagiadakis committed
    This patch adds to wireplumber code to manage the Snap audio
    permissions.
    
    SNAP containers have two main "audio" rules:
    
     * audio-playback: the applications inside the container can
       send audio samples into a sink
     * audio-record: the applications inside the container can
       get audio samples from a source
    
    Also, old SNAP containers had the "pulseaudio" rule, which just
    exposed the pulseaudio socket directly, without limits. This
    is similar to the current Flatpak audio permissions.
    
    In the pulseaudio days, an specific pulseaudio module was used
    that checked the permissions given to the application and
    allowed or forbide access to the pulseaudio operations.
    With the change to pipewire, this functionality must be
    implemented in pipewire-pulse and wireplumber to guarantee
    the sandbox security.
    
    The current code checks for the presence of the pipewire.snap.id
    property in a client, in which case it will read the
    pipewire.snap.audio.playback and pipewire.snap.audio.record
    properties, and allow or deny access to that client to
    the nodes with Audio/Sink or Audio/Source media.class
    property.
    
    See !567 and pipewire!1779
    2ec202df