dbus_bus_request_name (): Connections are not allowed to own the service
I had a similar problem, in my case the default avahi-dbus.conf that come with my system packet system just lack the last " </policy>
" before " </busconfig>
" which triggered this error.
I first thought the problem didn't come from this file since a rapid look at it is not enough to find this kind of syntax error.
System D-Bus does not allow punching out ownership with conf files
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.
several basic dbus questions
Am I correct that I can invent my own service names as long as they are unique and do not conflict with any other service names?
Yes
When I call dbus_bus_request_name() requesting my own service name, I get an error that says I am not allowed to own that service due to security policies in the configuration file.
I guess you're using the SYSTEM bus. Unless there's a reason to use the SYSTEM bus, it's easier to use the SESSION bus, especially for testing. There are other security things that the SYSTEM bus uses to ensure security of the system, take a look at some of the configuration files for the services, they show how to allow certain services to own specific names on the bus.
Am I correct to assume that the individual config files will get read in somehow?
Yes, if you look at the system.conf you can see the <includedir>
tag, which will include everything in that directory.
So how do I get the system bus to re-read the system.conf file after editing one of the individual .conf files in the system.d directory, or after added a new service config file like I did?
Send a SIGHUP
to the dbus-daemon.
Is this the proper way to configure the system bus so I can have 2 process pass messages?
That should work.
Related Topics
How to Capitalize First Letter of Each Line in Bash
How to Use One Instance of Emacs as the Default Text Editor? [Linux]
Direct Control of Hci Device (Bypass Bluetooth Drivers) on Linux
Termios Vmin Vtime and Blocking/Non-Blocking Read Operations
How to Redirect Output of Echo Over Ssh to a File
How to Change the Watchdog Timer in Linux Embedded
What Is Echo $? in Linux Terminal
How to Set Runpath of a Binary
No Error on Xcb_Grab_Key But Event Loop Not Catching (Global Hotkey)
Shell Script for Process Monitoring
Sending Sigint from Keyboard to Piped Commands in Bash
How to Redirect the Telnet Console Logs to a File Linux
Core Dump Filename Gets Thread Name Instead of Executable Name with Core_Pattern %E.%P.Core
Setting the Thread /Proc/Pid/Cmdline
How to Replace Finding Words with the Different in Each Occurrence in Vi/Vim Editor
Ignore Case When Trying to Match File Names Using Find Command in Linux