Bug 1366812

Summary: SELinux is preventing systemd from 'read' accesses on the file armat1.home:1.pid.
Product: [Fedora] Fedora Reporter: NM <andrew.kavalov>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 24CC: andrew.kavalov, dominick.grift, dwalsh, eric, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:1b0faaf9c45db33fbdb2ab4d803d9d44d00543286fa5ec7ac068fe3d500ec8c9;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-23 11:35:50 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 NM 2016-08-13 00:49:57 UTC
Description of problem:
Attempted to start TigerVNC server
systemctl start vncserver@:1
SELinux is preventing systemd from 'read' accesses on the file armat1.home:1.pid.

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

If you believe that systemd should be allowed read access on the armat1.home:1.pid file 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 '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:user_home_t:s0
Target Objects                armat1.home:1.pid [ file ]
Source                        systemd
Source Path                   systemd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-191.8.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.6.5-300.fc24.x86_64 #1 SMP Thu
                              Jul 28 01:10:12 UTC 2016 x86_64 x86_64
Alert Count                   3
First Seen                    2016-08-12 20:48:19 EDT
Last Seen                     2016-08-12 20:48:19 EDT
Local ID                      4cb8474c-779b-4f75-8cb3-33589f4082a8

Raw Audit Messages
type=AVC msg=audit(1471049299.148:819): avc:  denied  { read } for  pid=1 comm="systemd" name="armat1.home:1.pid" dev="dm-4" ino=28573909 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:user_home_t:s0 tclass=file permissive=0


Hash: systemd,init_t,user_home_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-191.8.fc24.noarch

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.6.5-300.fc24.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2016-08-16 16:30:19 UTC
NM, 

What is armat1.home:1.pid file?

Comment 2 Lukas Vrabec 2016-08-16 16:30:39 UTC
*** Bug 1366814 has been marked as a duplicate of this bug. ***

Comment 3 NM 2016-08-23 02:38:26 UTC
armat1.home:1.pid is the hostname:1.vnc_process_id_file 
After allowing access it works.
Thanks

Comment 4 Eric COUTURIER-GUILLAUME 2016-09-25 14:43:30 UTC
Description of problem:
Start Xvnc

Version-Release number of selected component:
selinux-policy-3.13.1-191.16.fc24.noarch

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.7.4-200.fc24.x86_64
type:           libreport