Bug 1442627

Summary: SELinux is preventing snapd from 'read' accesses on the directory /home.
Product: [Fedora] Fedora Reporter: Ricardo Ramos <delacosta610>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba, pmoore, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:bed313a2005f3b74f0d42b223826eb05621a3d0687f8e23e5bee86a85f3fc645;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-17 12:44:34 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 Ricardo Ramos 2017-04-16 18:40:45 UTC
Description of problem:
I was testing the app FileBot as a snap package, it was installed without any problems by using terminal but SELinux showed up after the app was installed.
SELinux is preventing snapd from 'read' accesses on the directory /home.

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

If cree que de manera predeterminada, snapd debería permitir acceso read sobre home directory.     
Then debería reportar esto como un error.
Puede generar un módulo de política local para permitir este acceso.
Do
allow this access for now by executing:
# ausearch -c 'snapd' --raw | audit2allow -M my-snapd
# semodule -X 300 -i my-snapd.pp

Additional Information:
Source Context                system_u:system_r:snappy_t:s0
Target Context                system_u:object_r:home_root_t:s0
Target Objects                /home [ dir ]
Source                        snapd
Source Path                   snapd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           filesystem-3.2-37.fc24.x86_64
Policy RPM                    selinux-policy-3.13.1-225.11.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.10.9-200.fc25.x86_64 #1 SMP Mon
                              Apr 10 14:48:16 UTC 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-04-16 13:35:35 -05
Last Seen                     2017-04-16 13:35:35 -05
Local ID                      9525d1fa-3081-48f9-afc6-56fe57eb3641

Raw Audit Messages
type=AVC msg=audit(1492367735.246:365): avc:  denied  { read } for  pid=8850 comm="snapd" name="home" dev="dm-0" ino=524290 scontext=system_u:system_r:snappy_t:s0 tcontext=system_u:object_r:home_root_t:s0 tclass=dir permissive=1


Hash: snapd,snappy_t,home_root_t,dir,read

Version-Release number of selected component:
selinux-policy-3.13.1-225.11.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.10.9-200.fc25.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2017-04-17 12:44:19 UTC
Snappy is not part of distribution policy. Closing as WONTFIX. Please fix it using local module in your system or contact snappy SELinux policy maintainer. For Local policy use:
https://lvrabec-selinux.rhcloud.com/2016/09/19/creating-local-module-quickly-in-cil/

$ seinfo -xadomain | grep snappy
$