Dbus_Bus_Request_Name (): Connections Are Not Allowed to Own the Service

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



Leave a reply



Submit