Bug 173067

Summary: (selinux) avahi daemon service startup failure
Product: [Fedora] Fedora Reporter: Nicolas Mailhot <nicolas.mailhot>
Component: selinux-policy-targetedAssignee: Daniel Walsh <dwalsh>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: jvdias
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: 2005-11-14 17:25:25 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:
Bug Depends On:    
Bug Blocks: 150221    

Description Nicolas Mailhot 2005-11-13 15:20:14 UTC
Description of problem:

The default targeted policy blocks the avahi daemon service

Version-Release number of selected component (if applicable):

avahi-0.5.2-6
selinux-policy-targeted-1.27.2-19

How reproducible:

Always

Steps to Reproduce:
 # /etc/init.d/avahi-daemon start
  
Actual results:

Nov 13 16:18:25 rousalka avahi-daemon[3827]: Found user 'avahi' (UID 70) and
group 'avahi' (GID 70).
Nov 13 16:18:25 rousalka avahi-daemon[3827]: Successfully dropped root privileges.
Nov 13 16:18:25 rousalka avahi-daemon[3827]: avahi-daemon 0.5.2 starting up.
Nov 13 16:18:25 rousalka avahi-daemon[3827]: bind(): Permission denied


type=AVC msg=audit(1131895125.515:343): avc:  denied  { setattr } for  pid=3835
comm="avahi-daemon" name="avahi-daemon" dev=dm-0 ino=2654210
scontext=root:system_r:avahi_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=dir
type=SYSCALL msg=audit(1131895125.515:343): arch=c000003e syscall=92 success=no
exit=-13 a0=40f28d a1=46 a2=46 a3=517270 items=1 pid=3835 auid=500 uid=0 gid=0
euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 comm="avahi-daemon"
exe="/usr/sbin/avahi-daemon"
type=CWD msg=audit(1131895125.515:343):  cwd="/"
type=PATH msg=audit(1131895125.515:343): item=0 name="/var/run/avahi-daemon/"
flags=1  inode=2654210 dev=fd:00 mode=040755 ouid=70 ogid=70 rdev=00:00
type=AVC msg=audit(1131895125.519:344): avc:  denied  { create } for  pid=3835
comm="avahi-daemon" name="socket" scontext=root:system_r:avahi_t:s0
tcontext=root:object_r:var_run_t:s0 tclass=sock_file
type=SYSCALL msg=audit(1131895125.519:344): arch=c000003e syscall=49 success=no
exit=-13 a0=9 a1=7ffffffb20d0 a2=6e a3=1a items=1 pid=3835 auid=500 uid=70
gid=70 euid=70 suid=70 fsuid=70 egid=70 sgid=70 fsgid=70 comm="avahi-daemon"
exe="/usr/sbin/avahi-daemon"
type=SOCKADDR msg=audit(1131895125.519:344):
saddr=01002F7661722F72756E2F61766168692D6461656D6F6E2F736F636B65740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
type=PATH msg=audit(1131895125.519:344): item=0 flags=10  inode=2654210
dev=fd:00 mode=040755 ouid=70 ogid=70 rdev=00:00

Comment 1 Daniel Walsh 2005-11-14 17:25:25 UTC
This is a labeling problem.

restorecon -R -v /var/run 

Should clean it up.  If it happens again, please reopen this bug.