Bug 177637

Summary: dbus system bus socket absent.
Product: [Fedora] Fedora Reporter: David Woodhouse <dwmw2>
Component: selinux-policy-targetedAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: johnp
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-27 06:01:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
audit.log none

Description David Woodhouse 2006-01-12 16:29:17 UTC
gnome-power-manager fails to start on a fresh FC5T2 install...


** (gnome-power-manager:3528): WARNING **: Failed to open connection to dbus
system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such
file or directory

This program cannot start until you start the dbussystem daemon
This is usually started in initscripts, and is usually called messagebus
It is STRONGLY recommended you reboot your compterafter restarting messagebus


** ERROR **: Unable to get system dbus connection
aborting...


dbus-daemon does seem to be running, but there's nothing in /var/run/dbus/

Running '/etc/init.d/messagebus restart' fails:
[root@pmac dbus]#  /etc/init.d/messagebus restart
Stopping system message bus:                               [FAILED]
Starting system message bus:                               [FAILED]

Strangely, running 'sh -x /etc/init.d/messagebus start' works:
[root@pmac dbus]# sh -x /etc/init.d/messagebus start
+ '[' -x /usr/bin/dbus-daemon ']'
+ . /etc/rc.d/init.d/functions
++ TEXTDOMAIN=initscripts
++ umask 022
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
++ export PATH
++ '[' -z '' ']'
++ COLUMNS=80
++ '[' -z '' ']'
+++ /sbin/consoletype
++ CONSOLETYPE=pty
++ '[' -f /etc/sysconfig/i18n -a -z '' ']'
++ . /etc/sysconfig/i18n
+++ LANG=en_US.UTF-8
+++ SYSFONT=latarcyrheb-sun16
++ '[' pty '!=' pty ']'
++ '[' -n '' ']'
++ export LANG
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/init ']'
++ . /etc/sysconfig/init
+++ BOOTUP=color
+++ GRAPHICAL=yes
+++ RES_COL=60
+++ MOVE_TO_COL='echo -en \033[60G'
+++ SETCOLOR_SUCCESS='echo -en \033[0;32m'
+++ SETCOLOR_FAILURE='echo -en \033[0;31m'
+++ SETCOLOR_WARNING='echo -en \033[0;33m'
+++ SETCOLOR_NORMAL='echo -en \033[0;39m'
+++ LOGLEVEL=3
+++ PROMPT=yes
++ '[' pty = serial ']'
++ '[' color '!=' verbose ']'
++ INITLOG_ARGS=-q
+ processname=dbus-daemon
+ servicename=messagebus
+ RETVAL=0
+ case "$1" in
+ start
+ echo -n 'Starting system message bus: '
Starting system message bus: + daemon --check messagebus dbus-daemon --system
+ local gotbase= force=
+ local base= user= nice= bg= pid=
+ nicelevel=0
+ '[' --check '!=' -check ']'
+ case $1 in
+ base=messagebus
+ gotbase=yes
+ shift 2
+ '[' dbus-daemon '!=' dbus-daemon ']'
+ '[' -z yes ']'
+ '[' -f /var/run/messagebus.pid ']'
+ '[' -n '' -a -z '' ']'
+ corelimit='ulimit -S -c 0'
+ '[' -n '' ']'
+ '[' color = verbose -a -z '' ']'
+ '[' -z '' ']'
+ /bin/bash -c 'ulimit -S -c 0 >/dev/null 2>&1 ; dbus-daemon --system'
+ '[' 0 -eq 0 ']'
+ success 'messagebus startup'
+ '[' color '!=' verbose -a -z '' ']'
+ echo_success
+ '[' color = color ']'
+ echo -en '\033[60G'
                                                           + echo -n '['
[+ '[' color = color ']'
+ echo -en '\033[0;32m'
+ echo -n '  OK  '
  OK  + '[' color = color ']'
+ echo -en '\033[0;39m'
+ echo -n ']'
]+ echo -ne '\r'
+ return 0
+ return 0
+ RETVAL=0
+ echo

+ '[' 0 -eq 0 ']'
+ touch /var/lock/subsys/messagebus
+ exit 0


After that, gnome-power-manager does manage to run.

Comment 1 David Woodhouse 2006-01-12 16:33:50 UTC
Hm. It isn't the '-x' which makes a difference. Just 'sh /etc/init.d/messagebus
restart' works, while it doesn't work without the 'sh'.

In /var/log/audit/audit.log 

I see AVC denials, despite having turned SElinux off when I was asked during the
installation.

type=AVC msg=audit(1137083751.862:271): avc:  denied  { connectto } for 
pid=2845 comm="cups-config-dae" name="system_bus_socket"
scontext=system_u:system_r:cupsd_config_t:s0
tcontext=user_u:system_r:unconfined_t:s0-s0:c0.c255 tclass=unix_stream_socket


Comment 2 David Woodhouse 2006-01-12 17:01:00 UTC
If I reboot and manually add 'selinux=0' to the kernel command line, this
problem does seem to go away. 

Comment 3 David Woodhouse 2006-01-12 18:32:55 UTC
I think access is being denied to /lib64/.

I also saw a message from gpm during the first boot, reporting that it couldn't
open libm.so.6. And I have this message in audit.log...

type=PATH msg=audit(1137082317.124:19): item=0 name="/lib64/libm.so.6" flags=101
 inode=391681 dev=08:05 mode=040755 ouid=0 ogid=0 rdev=00:00
type=AVC msg=audit(1137082317.124:20): avc:  denied  { search } for  pid=2600
comm="gpm" name="lib64" dev=sda5 ino=391681 scontext=system_u:system_r:gpm_t:s0
tcontext=system_u:object_r:file_t:s0 tclass=dir

I see lots of similar failures for dbus-daemon too. Will attach audit.log file.

Comment 4 David Woodhouse 2006-01-12 18:33:31 UTC
Created attachment 123130 [details]
audit.log

Comment 5 Daniel Walsh 2006-01-27 06:01:42 UTC
Fixed in selinux-policy-2.2.5-1