Bug 1261235 - SELinux is preventing sddm-helper from 'write' accesses on the file .Xauthority.
SELinux is preventing sddm-helper from 'write' accesses on the file .Xauthority.
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
22
x86_64 Unspecified
medium Severity low
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
abrt_hash:c06bb66b71e1c23b7dd8288b374...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-08 21:30 EDT by Richard Jasmin
Modified: 2015-12-17 12:20 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-17 12:20:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard Jasmin 2015-09-08 21:30:05 EDT
Description of problem:
I logged in.
SELinux is preventing sddm-helper from 'write' accesses on the file .Xauthority.

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

If you believe that sddm-helper should be allowed write access on the .Xauthority 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:
# grep sddm-helper /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.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                .Xauthority [ file ]
Source                        sddm-helper
Source Path                   sddm-helper
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-128.12.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.1.6-200.fc22.x86_64 #1 SMP Mon
                              Aug 17 19:54:31 UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-09-08 20:24:51 CDT
Last Seen                     2015-09-08 20:24:51 CDT
Local ID                      f2c0e2f8-332d-4aaa-bb71-e98c5a77af69

Raw Audit Messages
type=AVC msg=audit(1441761891.214:544): avc:  denied  { write } for  pid=1587 comm="sddm-helper" name=".Xauthority" dev="dm-3" ino=4456483 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: sddm-helper,xdm_t,user_home_t,file,write

Version-Release number of selected component:
selinux-policy-3.13.1-128.12.fc22.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.1.6-200.fc22.x86_64
type:           libreport

Potential duplicate: bug 1176052
Comment 1 Miroslav Grepl 2015-09-11 09:05:35 EDT
Are you able to reproduce it after

$ restorecon ~/.Xauth*
Comment 2 Lorenzo Buzzi 2015-09-17 04:51:58 EDT
$ restorecon -F -v ~/.Xauthority
resets the context to unconfined_u:object_r:xauth_home_t

But at next login the context is again unconfined_u:object_r:home_root_t and sddm-helper is prevented from writing it.
Comment 3 Miroslav Grepl 2015-10-09 03:44:43 EDT
(In reply to Lorenzo Buzzi from comment #2)
> $ restorecon -F -v ~/.Xauthority
> resets the context to unconfined_u:object_r:xauth_home_t
> 
> But at next login the context is again unconfined_u:object_r:home_root_t and
> sddm-helper is prevented from writing it.

Can you show us what labels are for 

$ ls -Z /home
Comment 4 Richard Jasmin 2015-10-16 12:12:14 EDT
system_u:object_r:lost_found_t:s0    lost+found
unconfined_u:object_r:user_home_dir_t:s0    me
Comment 5 Miroslav Grepl 2015-11-10 03:35:45 EST
Ok it is correct. Do you still have the same issue?
Comment 6 Richard Jasmin 2015-12-17 12:20:47 EST
not anymore. seems some files may have been out of whack.
I ported as it were from debian based systems a while back.Linux is wonderful in that regards but Debian based setups DO NOT have SELinux working by default.

AND MIND YOU, THEY SHOULD.

Getting it to work is like pulling teeth.

DoD and letter agencies dont develop software to make themselves look pretty.They do it to solve a problem.So maybe people should USE it if they open source something.....

Note You need to log in before you can comment on or make changes to this bug.