Bug 1411293

Summary: SELinux is preventing lightdm from 'write' accesses on the file .xsession-errors.
Product: [Fedora] Fedora Reporter: Sam Tygier <samtygier>
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:eb9f79542bdb42955c37dea066bd5a7812776e32d0815782d0e8c9a8ae112494;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-12 06:12:44 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 Sam Tygier 2017-01-09 11:25:24 UTC
Description of problem:
I get this every log in. This is on a new F25 install, with the home dir copied from a F23 install.
SELinux is preventing lightdm from 'write' accesses on the file .xsession-errors.

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

If you believe that lightdm should be allowed write access on the .xsession-errors 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 '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:home_root_t:s0
Target Objects                .xsession-errors [ file ]
Source                        lightdm
Source Path                   lightdm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-225.3.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.8.15-300.fc25.x86_64 #1 SMP Thu
                              Dec 15 23:10:23 UTC 2016 x86_64 x86_64
Alert Count                   4
First Seen                    2017-01-08 15:24:02 GMT
Last Seen                     2017-01-09 10:57:32 GMT
Local ID                      0009b48b-82c0-4dd3-a097-dbe7c342c038

Raw Audit Messages
type=AVC msg=audit(1483959452.529:741): avc:  denied  { write } for  pid=17528 comm="lightdm" name=".xsession-errors" dev="dm-0" ino=1217 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:home_root_t:s0 tclass=file permissive=0


Hash: lightdm,xdm_t,home_root_t,file,write

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

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

Comment 1 Sam Tygier 2017-02-02 10:49:34 UTC
Description of problem:
I get this alert at login

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

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

Comment 2 Daniel Walsh 2017-02-12 06:12:44 UTC
Relabel your homedir.