balena-os / meta-balena

A collection of Yocto layers used to build balenaOS images
https://www.balena.io/os
969 stars 115 forks source link

Allow running of third-party D-Bus services on top of the host OS D-Bus daemon #2086

Open majorz opened 3 years ago

majorz commented 3 years ago

Third-party D-Bus services need default policies necessary for correct operation installed in /usr/local/share/dbus-1/system.d.

This is often needed by Bluetooth managing services that expose an API through D-Bus. A sample policy configuration file looks like this:

<!-- This configuration file specifies the required security policies
     for BlueALSA core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own_prefix="org.bluealsa"/>
    <allow send_destination="org.bluealsa"/>
  </policy>

  <policy group="audio">
    <allow send_destination="org.bluealsa"/>
  </policy>

</busconfig>

Hostapp extensions will be capable of covering this use case when released.

jellyfish-bot commented 3 years ago

[alexgg] This issue has attached support thread https://jel.ly.fish/b0a82631-8581-472c-b15c-58ca8ec52c3e

alexgg commented 3 years ago

Also https://github.com/balena-io/balena-io/issues/2184

jellyfish-bot commented 3 years ago

[tmigone] This issue has attached support thread https://jel.ly.fish/47a95b21-692a-447e-8c5d-db6e7ba4ee46