View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017810 | CentOS-8 | dbus | public | 2020-10-21 21:04 | 2020-11-20 02:19 |
Reporter | ddesmet | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 8.2.2004 | ||||
Summary | 0017810: dbus-daemon rpm verify + setperms breaks systemd-hostnamed | ||||
Description | For compliancy reasons, we do regular ansible runs in which we a rpm --verify to check on file mode differences between files on the system and how they are packaged. If we find files that differ in mode/type from the rpm database, we fix them with rpm --setperms/--restore . With all versions of centos 8, the dbus-daemon package always pops-up in the rpm verify check after every reboot. Once the ansible run detects it and fixes it, it breaks the dbus socket sessions, like hostnamectl isn't working because systemd-hostnamed.service fails to start due to a permission denied. | ||||
Steps To Reproduce | 1. Minimal CentOS 8.X 2. rpm -V dbus-daemon #This will tell you there is a mode difference for the /run/dbus/ directory 3. rpm -qf /run/dbus/ # This will tell you that the bus-daemon-1.12.8-10.el8_2.x86_64 package is creating this direcoty 4. rpm -qlv dbus-daemon # This will tell you that the directory permissions should be 000 for this directory 5. rpm -setperms dbus-daemon # This will fix the permissions according to the rpm database 6. hostnamectl status # This command will time out due to a permissions issue | ||||
Additional Information | [root@myhostname.abc ~]# cat /etc/centos-release CentOS Linux release 8.2.2004 (Core) [root@myhostname.abc ~]# uname -a Linux myhostname.abc 4.18.0-193.19.1.el8_2.x86_64 #1 SMP Mon Sep 14 14:37:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux [root@myhostname.abc ~]# rpm -qf /run/dbus/ dbus-daemon-1.12.8-10.el8_2.x86_64 [root@myhostname.abc ~]# ls -alh /run/dbus/ total 0 drwxr-xr-x. 2 root root 60 Oct 21 20:41 . drwxr-xr-x. 23 root root 720 Oct 21 20:41 .. srw-rw-rw-. 1 root root 0 Oct 21 20:41 system_bus_socket [root@myhostname.abc ~]# rpm -V dbus-daemon ; echo $? .M....... g /run/dbus 1 [root@myhostname.abc ~]# rpm -qlv dbus-daemon d--------- 2 root root 0 Jul 21 14:47 /run/dbus -rwxr-xr-x 1 root root 16888 Jul 21 14:47 /usr/bin/dbus-cleanup-sockets -rwxr-xr-x 1 root root 245640 Jul 21 14:47 /usr/bin/dbus-daemon -rwxr-xr-x 1 root root 16432 Jul 21 14:47 /usr/bin/dbus-run-session -rwxr-xr-x 1 root root 25288 Jul 21 14:47 /usr/bin/dbus-test-tool drwxr-xr-x 2 root root 0 Jul 21 14:47 /usr/lib/.build-id drwxr-xr-x 2 root root 0 Jul 21 14:47 /usr/lib/.build-id/44 lrwxrwxrwx 1 root root 31 Jul 21 14:47 /usr/lib/.build-id/44/ccea0966df4728d07cc011412644b6854391df -> ../../../../usr/bin/dbus-daemon drwxr-xr-x 2 root root 0 Jul 21 14:47 /usr/lib/.build-id/76 lrwxrwxrwx 1 root root 40 Jul 21 14:47 /usr/lib/.build-id/76/cb8f881dcda983a3ba1c1513f7a0e7c7f560b0 -> ../../../../usr/bin/dbus-cleanup-sockets drwxr-xr-x 2 root root 0 Jul 21 14:47 /usr/lib/.build-id/7d lrwxrwxrwx 1 root root 34 Jul 21 14:47 /usr/lib/.build-id/7d/af9fcc04097bf1a032af39e7044b244af2f800 -> ../../../../usr/bin/dbus-test-tool drwxr-xr-x 2 root root 0 Jul 21 14:47 /usr/lib/.build-id/83 lrwxrwxrwx 1 root root 36 Jul 21 14:47 /usr/lib/.build-id/83/2fe6ce9a72ef1ce8ee4da3d09f2ebd9c1314ba -> ../../../../usr/bin/dbus-run-session drwxr-xr-x 2 root root 0 Jul 21 14:47 /usr/lib/.build-id/ff lrwxrwxrwx 1 root root 56 Jul 21 14:47 /usr/lib/.build-id/ff/4b994e074aa2baded8deeb57f853407a98e3d0 -> ../../../../usr/libexec/dbus-1/dbus-daemon-launch-helper -rw-r--r-- 1 root root 380 Jul 21 14:47 /usr/lib/systemd/system/dbus.service -rw-r--r-- 1 root root 102 Jul 21 14:47 /usr/lib/systemd/system/dbus.socket lrwxrwxrwx 1 root root 12 Jul 21 14:47 /usr/lib/systemd/system/messagebus.service -> dbus.service lrwxrwxrwx 1 root root 15 Jul 21 14:47 /usr/lib/systemd/system/multi-user.target.wants/dbus.service -> ../dbus.service lrwxrwxrwx 1 root root 14 Jul 21 14:47 /usr/lib/systemd/system/sockets.target.wants/dbus.socket -> ../dbus.socket -rw-r--r-- 1 root root 360 Jul 21 14:47 /usr/lib/systemd/user/dbus.service -rw-r--r-- 1 root root 178 Jul 21 14:47 /usr/lib/systemd/user/dbus.socket lrwxrwxrwx 1 root root 14 Jul 21 14:47 /usr/lib/systemd/user/sockets.target.wants/dbus.socket -> ../dbus.socket -rw-r--r-- 1 root root 365 Jul 21 14:47 /usr/lib/tmpfiles.d/dbus.conf drwxr-xr-x 2 root root 0 Jul 21 14:47 /usr/libexec/dbus-1 -rwsr-x--- 1 root dbus 63752 Jul 21 14:47 /usr/libexec/dbus-1/dbus-daemon-launch-helper drwxr-xr-x 2 root root 0 Jul 21 14:47 /usr/share/doc/dbus-daemon -rw-r--r-- 1 root root 4695 Oct 30 2017 /usr/share/doc/dbus-daemon/AUTHORS -rw-r--r-- 1 root root 215 Oct 30 2017 /usr/share/doc/dbus-daemon/ChangeLog -rw-r--r-- 1 root root 13632 Oct 30 2017 /usr/share/doc/dbus-daemon/HACKING -rw-r--r-- 1 root root 117110 Apr 30 2018 /usr/share/doc/dbus-daemon/NEWS -rw-r--r-- 1 root root 7226 Oct 30 2017 /usr/share/doc/dbus-daemon/README drwxr-xr-x 2 root root 0 Jul 21 14:47 /usr/share/licenses/dbus-daemon -rw-r--r-- 1 root root 29176 Oct 30 2017 /usr/share/licenses/dbus-daemon/COPYING -rw-r--r-- 1 root root 1195 Jul 21 14:47 /usr/share/man/man1/dbus-cleanup-sockets.1.gz -rw-r--r-- 1 root root 13433 Jul 21 14:47 /usr/share/man/man1/dbus-daemon.1.gz -rw-r--r-- 1 root root 1740 Jul 21 14:47 /usr/share/man/man1/dbus-run-session.1.gz -rw-r--r-- 1 root root 2249 Jul 21 14:47 /usr/share/man/man1/dbus-test-tool.1.gz drwxr-xr-x 2 root root 0 Jul 21 14:47 /var/lib/dbus [root@myhostname.abc ~]# rpm -vv -setperms dbus-daemon ufdio: 1 reads, 17154 total bytes in 0.000008 secs D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/*.key D: couldn't find any keys in /var/lib/rpm/pubkeys/*.key D: loading keyring from rpmdb D: opening db environment /var/lib/rpm cdb:0x401 D: opening db index /var/lib/rpm/Packages 0x400 mode=0x0 D: locked db index /var/lib/rpm/Packages D: opening db index /var/lib/rpm/Name 0x400 mode=0x0 D: read h# 404 Header SHA1 digest: OK D: added key gpg-pubkey-8483c65d-5ccc5b19 to keyring D: Using legacy gpg-pubkey(s) from rpmdb D: read h# 540 Header V3 RSA/SHA256 Signature, key ID 8483c65d: OK Header SHA256 digest: OK Header SHA1 digest: OK D: closed db index /var/lib/rpm/Packages D: closed db index /var/lib/rpm/Name D: closed db environment /var/lib/rpm D: Exit status: 0 [root@myhostname.abc ~]# hostnamectl status Failed to query system properties: Failed to activate service 'org.freedesktop.hostname1': timed out (service_start_timeout=25000ms) [root@myhostname.abc ~]# ls -alh /run/dbus/ total 0 d---------. 2 root root 60 Oct 21 20:41 . drwxr-xr-x. 23 root root 720 Oct 21 20:41 .. srw-rw-rw-. 1 root root 0 Oct 21 20:41 system_bus_socket [root@myhostname.abc ~]# rpm -V dbus-daemon ; echo $? 0 Oct 21 20:43:47 myhostname.abc dbus-daemon[663]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.24' (uid=0 pid=1021 comm="hostnamectl stat> Oct 21 20:43:47 myhostname.abc systemd[1]: Starting Hostname Service... -- Subject: Unit systemd-hostnamed.service has begun start-up -- Defined-By: systemd -- Support: https://access.redhat.com/support -- -- Unit systemd-hostnamed.service has begun starting up. Oct 21 20:43:47 myhostname.abc systemd-hostnamed[1022]: Failed to get system bus connection: Permission denied Oct 21 20:43:47 myhostname.abc systemd[1]: systemd-hostnamed.service: Main process exited, code=exited, status=1/FAILURE Oct 21 20:43:47 myhostname.abc systemd[1]: systemd-hostnamed.service: Failed with result 'exit-code'. Oct 21 20:43:47 myhostname.abc systemd[1]: Failed to start Hostname Service. -- Subject: Unit systemd-hostnamed.service has failed -- Defined-By: systemd -- Support: https://access.redhat.com/support -- -- Unit systemd-hostnamed.service has failed. -- -- The result is failed. Oct 21 20:44:12 myhostname.abc dbus-daemon[663]: [system] Failed to activate service 'org.freedesktop.hostname1': timed out (service_start_timeout=25000ms) | ||||
Tags | D-Bus Error | ||||
Note that this is fixed upstream - references: https://access.redhat.com/errata/RHBA-2020:4449 https://bugzilla.redhat.com/show_bug.cgi?id=1797833 |
|
Sorry - new to this bugtracker. In addition to the mentioned issues this also prevents a login to the GNOME desktop since /run/dbus is inaccessible - relatively major impact here | |