Bug 700574

Summary: SELinux is preventing /usr/sbin/avahi-daemon from 'setattr' accesses on the directory avahi-daemon.
Product: [Fedora] Fedora Reporter: Jayson Reis <jaysonsantos2003>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:dd2f7d0530b958a1cdcfb9bce9d3939d69ee1ccb2a332ef000e0238c6d6633da
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-28 19:08:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jayson Reis 2011-04-28 17:20:02 UTC
SELinux is preventing /usr/sbin/avahi-daemon from 'setattr' accesses on the directory avahi-daemon.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that avahi-daemon should be allowed setattr access on the avahi-daemon directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep avahi-daemon /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:avahi_t:s0
Target Context                unconfined_u:object_r:var_run_t:s0
Target Objects                avahi-daemon [ dir ]
Source                        avahi-daemon
Source Path                   /usr/sbin/avahi-daemon
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           avahi-0.6.30-1.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-15.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.3-18.fc15.x86_64 #1 SMP
                              Fri Apr 22 13:24:23 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Thu 28 Apr 2011 02:17:53 PM BRT
Last Seen                     Thu 28 Apr 2011 02:17:53 PM BRT
Local ID                      0b9575ab-dcd9-437c-9a2a-8bbfe00dffd1

Raw Audit Messages
type=AVC msg=audit(1304011073.243:221): avc:  denied  { setattr } for  pid=10352 comm="avahi-daemon" name="avahi-daemon" dev=tmpfs ino=3250285 scontext=system_u:system_r:avahi_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=dir


type=SYSCALL msg=audit(1304011073.243:221): arch=x86_64 syscall=chown success=no exit=EACCES a0=41559e a1=46 a2=46 a3=0 items=0 ppid=1 pid=10352 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=avahi-daemon exe=/usr/sbin/avahi-daemon subj=system_u:system_r:avahi_t:s0 key=(null)

Hash: avahi-daemon,avahi_t,var_run_t,dir,setattr

audit2allow

#============= avahi_t ==============
allow avahi_t var_run_t:dir setattr;

audit2allow -R

#============= avahi_t ==============
allow avahi_t var_run_t:dir setattr;

Comment 1 Miroslav Grepl 2011-04-28 18:13:10 UTC
Could add me output of

# ls -dZ /var/run/avahi-daemon

Looks like the dir is mislabeled.

Comment 2 Jayson Reis 2011-04-28 18:32:39 UTC
[jayson@jayson-laptop ~]$ ls -dZ /var/run/avahi-daemon
drwxr-xr-x. avahi avahi unconfined_u:object_r:var_run_t:s0 /var/run/avahi-daemon

Comment 3 Daniel Walsh 2011-04-28 19:08:12 UTC
restorecon -R -v /var/run/avahi-daemon

Comment 4 Daniel Walsh 2011-04-28 19:08:58 UTC
If it happens again please reopen the bug.