System D-Bus does not allow punching out ownership with conf files

本小妞迷上赌 提交于 2019-11-30 19:31:46

I finally found the issue. When Dbus looks for configuration files for punching out permissions (like ownerships) the file not only must be in system.d/ but it must also end in .conf.

My configuration file "org.dbus.arduino" should have been "org.dbus.arduino.conf". I removed the code from system.conf. Confirmed I no longer had permissions, created a configuration file at "system.d/org.dbus.arduino.conf", I was granted permissions. I then attempted to rename the file to just "org.dbus.arduino" and confirmed the permissions were denied.

I did the same solution as the accepted answer but I also got it to work with this alternative.

I noticed that in my system.conf file, there is this note:

For local configuration changes, create a file system-local.conf or files matching system.d/*.conf in the same directory as this one, with a element containing configuration directives. These directives can override D-Bus or OS defaults.

Instead of putting a <name.of.my.dbus.service>.conf under system.d/, I was able to make it work by creating a system-local.conf in the same directory as the system.conf, with the contents like this:

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
  <policy context="default">
    <allow own="dbus.my.own.service"/>
  </policy>
</busconfig>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!