dbus permissions problem

Thomas Kluyver thomas at kluyver.me.uk
Wed Feb 17 09:01:37 UTC 2021


Hi Greg,

I think you're looking at the config files which the D-Bus system bus uses to decide who can talk to org.freedesktop.timedate1, but the problem you're seeing is with timedate1's own permissions check. D-Bus is allowing your messages through (it probably does this with no special configuration) but then timedate1 refuses to make the requested change.

The man page here mentions polkit actions (see the 'security' section):
https://www.freedesktop.org/software/systemd/man/org.freedesktop.timedate1.html

So you probably need to figure out how to set a suitable polkit rule.

Best wishes,
Thomas

On Tue, 16 Feb 2021, at 19:38, Greg Wilson-Lindberg wrote:
> I'm trying to run a program written in Qt and running on a custom Yocto 
> Linux system on a Raspberry Pi4. My application is trying to change the 
> timezone, and the Qt application uses a call to dbus to do this. The 
> application works correctly if run as the root user but fails when run 
> as a normal user. Using dbus-monitor the error is reported as a 
> permissions.
> 
> I've searched the internet and the only things that I can find indicate 
> that the org.freedesktop.timedate1.conf files in 
> /usr/share/dbus-1/system.d and /etc/dbus-1/system.d control 
> permissions. I first changed the /etc/dbus-1/system.d version of the 
> file to add permissions for our user. This had no effect.
> 
> I then changed the default permissions in the 
> /usr/share/dbus-1/system.d version of the file, and then added a 
> section that specifically granted our user full permissions. None of 
> these changes has had any effect.
> 
> Here are the changes that I added to both of the 
> org.freedesktop.timedate1.conf files.
> 
>         <policy user="sakura">
>                 <allow own="org.freedesktop.timedate1"/> 
>                 <allow send_path="/org/freedesktop/timedate1"/>
>                 <allow send_destination="org.freedesktop.timedate1"/>
>                 <allow receive_sender="org.freedesktop.timedate1"/>
>         </policy>
> 
> Here is the output from: dbus-monitor --system --profile
> sig	1613424707.647232	4	:1.0	<none>	/org/freedesktop/timesync1	org.freedesktop.DBus.Properties	PropertiesChanged
> mc	1613424707.737446	8	:1.11	org.freedesktop.timedate1	/org/freedesktop/timedate1	org.freedesktop.timedate1	SetTimezone
> mc	1613424707.738188	8	:1.12	org.freedesktop.DBus	/org/freedesktop/DBus	org.freedesktop.DBus	GetConnectionUnixUser
> mr	1613424707.738272	5	org.freedesktop.DBus	:1.12	8
> err	1613424707.738731	9	:1.12	:1.11	8
> 
> Thanks in advance to anyone that can help me with this problem,
> 
> Greg Wilson-Lindberg
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dbus
>


More information about the dbus mailing list