Bug 1398875

Summary: SELinux is preventing lightdm from 'execute' accesses on the file screen.sh.
Product: [Fedora] Fedora Reporter: Фукидид <fukidid>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED NOTABUG 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:9d08cd318d72c6837b9b4c5327e024eee05b6149bb1870c1db3a39b12eed4c18;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-30 13:15:14 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 Фукидид 2016-11-26 22:18:36 UTC
Description of problem:
http://www.linuxrussia.com/2013/08/xrandr-linux-ubuntu.html
SELinux is preventing lightdm from 'execute' accesses on the file screen.sh.

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

If вы считаете, что lightdm следует разрешить доступ execute к screen.sh file по умолчанию.
Then рекомендуется создать отчет об ошибке.
Чтобы разрешить доступ, можно создать локальный модуль политики.
Do
allow this access for now by executing:
# ausearch -c 'lightdm' --raw | audit2allow -M my-lightdm
# semodule -X 300 -i my-lightdm.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                screen.sh [ file ]
Source                        lightdm
Source Path                   lightdm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-224.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.8.8-300.fc25.x86_64 #1 SMP Tue
                              Nov 15 18:10:06 UTC 2016 x86_64 x86_64
Alert Count                   9
First Seen                    2016-11-26 20:16:52 +03
Last Seen                     2016-11-26 20:31:17 +03
Local ID                      a78fc95a-7344-401a-b5ca-f940080d63e8

Raw Audit Messages
type=AVC msg=audit(1480181477.858:191): avc:  denied  { execute } for  pid=1509 comm="lightdm" name="screen.sh" dev="dm-3" ino=40241446 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=0


Hash: lightdm,xdm_t,user_home_t,file,execute

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

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.8.8-300.fc25.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2016-11-30 13:15:14 UTC
Hi, 
Please run:
# semanage fcontext -a -t xdm_exec_t PATH_TO/screen.sh
# restorecon PATH_TO/screen.sh

To fix your issue.