Bug 1665450 - Failure to start the User Message Bus - ERROR manager_ini_reader_parse_file @ ../src/launch/main.c +888: Permission denied
Summary: Failure to start the User Message Bus - ERROR manager_ini_reader_parse_file @...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dbus-broker
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom Gundersen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-11 13:14 UTC by Yanko Kaneti
Modified: 2019-02-22 12:40 UTC (History)
3 users (show)

Fixed In Version: 18-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-22 12:40:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Yanko Kaneti 2019-01-11 13:14:49 UTC
Description of problem:.
dbus-broker-launch fails tto start when there is a service definition file that it can't read.

In my case
/usr/share/dbus-1/services/org.selinux.Restorecond.service
which for some reason is 600 in the rawhide policycoreutils-restorecond-2.8-13.fc30.x86_64 package.


......
Jan 11 15:05:17 systemd[1]: Started Session c6 of user gdm.
Jan 11 15:05:17 gdm-launch-environment][6763]: pam_unix(gdm-launch-environment:session): session opened for user gdm by (uid=0)
Jan 11 15:05:17 audit[6763]: USER_START pid=6763 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_umask acct="gdm" exe="/usr/libexec/gdm-session-worker" hostname=d2 addr=? terminal=/dev/tty1 res=success'
Jan 11 15:05:17 systemd[6768]: Starting D-Bus User Message Bus...
Jan 11 15:05:17 dbus-broker-launch[6777]: ERROR manager_ini_reader_parse_file @ ../src/launch/main.c +888: Permission denied
Jan 11 15:05:17 dbus-broker-launch[6777]:       manager_load_service_file @ ../src/launch/main.c +940
Jan 11 15:05:17 dbus-broker-launch[6777]:       manager_load_service_dir @ ../src/launch/main.c +1058
Jan 11 15:05:17 dbus-broker-launch[6777]:       manager_load_standard_session_services @ ../src/launch/main.c +1219
Jan 11 15:05:17 dbus-broker-launch[6777]:       manager_load_services @ ../src/launch/main.c +1275
Jan 11 15:05:17 dbus-broker-launch[6777]:       manager_run @ ../src/launch/main.c +1602
Jan 11 15:05:17 dbus-broker-launch[6777]:       run @ ../src/launch/main.c +1820
Jan 11 15:05:17 dbus-broker-launch[6777]:       main @ ../src/launch/main.c +1849
Jan 11 15:05:17 dbus-broker-launch[6777]: Exiting due to fatal error: -13
Jan 11 15:05:17 systemd[6768]: dbus-broker.service: Main process exited, code=exited, status=1/FAILURE
Jan 11 15:05:17 systemd[6768]: dbus-broker.service: Failed with result 'exit-code'.
Jan 11 15:05:17 systemd[6768]: Failed to start D-Bus User Message Bus.
...

Version-Release number of selected component (if applicable):
dbus-broker-17-1.fc30.x86_64

Comment 1 David Herrmann 2019-01-11 16:59:28 UTC
I highly recommend fixing this in the original package. I would consider this a bug in the package that installs a non-readable service-file, and I doubt they intended the file to be ignored.

However, since we promise compatibility to dbus-daemon(1), I went ahead and aligned the behavior of dbus-broker with the reference-implementation [1]. Once @tomegun approves this, we can cherry-pick it for rawhide.

Thanks a lot for the report!
David

[1] https://github.com/bus1/dbus-broker/pull/184

Comment 2 Yanko Kaneti 2019-01-14 13:50:17 UTC
Thanks.

FWIW policycoreutils will probably fix the permissions of that file.  bug 1626462

Comment 3 Yanko Kaneti 2019-01-22 08:02:01 UTC
with 17-2+  I the launcher is still crashing later in manager_load_service_file with that particular service file.

I've filed something that might fix it in:
https://github.com/bus1/dbus-broker/pull/189

Comment 4 Tom Gundersen 2019-02-21 11:27:23 UTC
Thanks for following up on this. I just pushed 18-1 to rawhide with your fix, please let us know if you are still experiencing the bug.

Comment 5 Yanko Kaneti 2019-02-22 11:16:48 UTC
In the meantime upstream has fixed the permissions of the restorecond service file, so I changed it back to 600 and tried dbus-broker-18-1.fc31.x86_64.  
Everything still works OK.
 dbus-broker-launch[9367]: Read access denied for service file '/usr/share/dbus-1/services/org.selinux.Restorecond.service'

Thanks

Comment 6 David Rheinsberg 2019-02-22 12:40:59 UTC
(In reply to Yanko Kaneti from comment #5)
> In the meantime upstream has fixed the permissions of the restorecond
> service file, so I changed it back to 600 and tried
> dbus-broker-18-1.fc31.x86_64.  
> Everything still works OK.
>  dbus-broker-launch[9367]: Read access denied for service file
> '/usr/share/dbus-1/services/org.selinux.Restorecond.service'

Thanks a lot! And also thanks for talking with `restorecond` packagers and getting the issue fixed!


Note You need to log in before you can comment on or make changes to this bug.