Bug 1470870

Summary: SELinux is preventing systemd from 'read' accesses on the lnk_file /var/lib/snapd/snap/atom-cwayne/current.
Product: [Fedora] Fedora Reporter: ToFabricio <ToFabricio_90>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dominick.grift, dwalsh, jan.public, lvrabec, mgrepl, mochabacha, plautrba, pmoore, predrag.zvijerac, ssekidde, victormelo_monkey, virgilioc
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:45114e32a5d27890c3fc9be4f706d64d5ce85b53213f957d7f1ba3471bca17fd;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-16 12:50:02 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 ToFabricio 2017-07-13 21:37:30 UTC
Description of problem:
SELinux is preventing systemd from 'read' accesses on the lnk_file /var/lib/snapd/snap/atom-cwayne/current.

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

If cree que de manera predeterminada, systemd debería permitir acceso read sobre current lnk_file.     
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 'systemd' --raw | audit2allow -M my-systemd
# semodule -X 300 -i my-systemd.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:object_r:snappy_var_lib_t:s0
Target Objects                /var/lib/snapd/snap/atom-cwayne/current [ lnk_file
                              ]
Source                        systemd
Source Path                   systemd
Port                          <Desconocido>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-259.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.11.8-300.fc26.x86_64 #1 SMP Thu
                              Jun 29 20:09:48 UTC 2017 x86_64 x86_64
Alert Count                   3
First Seen                    2017-07-12 12:08:11 -05
Last Seen                     2017-07-12 17:53:07 -05
Local ID                      a0c844f4-d711-4727-89f4-dd9e10ce274e

Raw Audit Messages
type=AVC msg=audit(1499899987.775:312): avc:  denied  { read } for  pid=1 comm="systemd" name="current" dev="dm-0" ino=2363909 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:snappy_var_lib_t:s0 tclass=lnk_file permissive=0


Hash: systemd,init_t,snappy_var_lib_t,lnk_file,read

Version-Release number of selected component:
selinux-policy-3.13.1-259.fc26.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.8-300.fc26.x86_64
type:           libreport

Potential duplicate: bug 1444808

Comment 1 Jan Vlug 2017-10-16 08:02:13 UTC
Description of problem:
Unlocking my laptop after that it was on for a few hours without using it.

Version-Release number of selected component:
selinux-policy-3.13.1-260.10.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.13.4-200.fc26.x86_64
type:           libreport

Comment 2 Lukas Vrabec 2017-10-16 12:50:02 UTC
Snappy is not part of Distribution SELinux policy. Closing.