Bug 1927901

Summary: SELinux is preventing avahi-daemon from 'watch' accesses on the directory /services.
Product: [Fedora] Fedora Reporter: Ian Laurie <nixuser>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dwalsh, grepl.miroslav, lvrabec, mmalik, omosnace, plautrba, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:1f5e5ddc482972ba5baf01e273ea8555398deea8cb1677a595eea969bdf4f802;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-11 20:02:08 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:

Description Ian Laurie 2021-02-11 19:15:07 UTC
Description of problem:
Logged into Xfce.
SELinux is preventing avahi-daemon from 'watch' accesses on the directory /services.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/services default label should be default_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /services

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that avahi-daemon should be allowed watch access on the services 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:
# ausearch -c 'avahi-daemon' --raw | audit2allow -M my-avahidaemon
# semodule -X 300 -i my-avahidaemon.pp

Additional Information:
Source Context                system_u:system_r:avahi_t:s0
Target Context                system_u:object_r:etc_t:s0
Target Objects                /services [ dir ]
Source                        avahi-daemon
Source Path                   avahi-daemon
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.7-18.fc34.noarch
Local Policy RPM              selinux-policy-targeted-3.14.7-18.fc34.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.11.0-0.rc7.149.fc34.x86_64 #1
                              SMP Mon Feb 8 16:23:47 UTC 2021 x86_64 x86_64
Alert Count                   1
First Seen                    2021-02-12 06:07:51 AEDT
Last Seen                     2021-02-12 06:07:51 AEDT
Local ID                      4d9b9216-0d36-40b9-99f8-00946bc92333

Raw Audit Messages
type=AVC msg=audit(1613070471.773:136): avc:  denied  { watch } for  pid=610 comm="avahi-daemon" path="/services" dev="sda2" ino=81353 scontext=system_u:system_r:avahi_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=dir permissive=1


Hash: avahi-daemon,avahi_t,etc_t,dir,watch

Version-Release number of selected component:
selinux-policy-targeted-3.14.7-18.fc34.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.14.0
hashmarkername: setroubleshoot
kernel:         5.11.0-0.rc7.149.fc34.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2021-02-11 20:02:08 UTC

*** This bug has been marked as a duplicate of bug 1927599 ***