Skip to content

Instantly share code, notes, and snippets.

@radupotop
Forked from dreamcat4/example-dbus.conf
Created April 25, 2020 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radupotop/38cb55018d3ceb0b2a78c6c6fcfdc860 to your computer and use it in GitHub Desktop.
Save radupotop/38cb55018d3ceb0b2a78c6c6fcfdc860 to your computer and use it in GitHub Desktop.
tvheadend dbus-1/ root~# cat /usr/local/etc/dbus-1/system.d/avahi-dbus.conf
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Only root or user avahi can own the Avahi service -->
<policy user="avahi">
<allow own="org.freedesktop.Avahi"/>
</policy>
<policy user="root">
<allow own="org.freedesktop.Avahi"/>
</policy>
<!-- Allow anyone to invoke methods on Avahi server, except SetHostName -->
<policy context="default">
<allow send_destination="org.freedesktop.Avahi"/>
<allow receive_sender="org.freedesktop.Avahi"/>
<deny send_destination="org.freedesktop.Avahi"
send_interface="org.freedesktop.Avahi.Server" send_member="SetHostName"/>
</policy>
<!-- Allow everything, including access to SetHostName to users of the group "network" -->
<policy group="network">
<allow send_destination="org.freedesktop.Avahi"/>
<allow receive_sender="org.freedesktop.Avahi"/>
</policy>
<policy user="root">
<allow send_destination="org.freedesktop.Avahi"/>
<allow receive_sender="org.freedesktop.Avahi"/>
</policy>
</busconfig>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment