Bug 521162 - setroubleshoot: SELinux is preventing the kdm from using potentially mislabeled files (/home/Peter/.Xauthority-n).
Summary: setroubleshoot: SELinux is preventing the kdm from using potentially mis...
Alias: None
Product: Fedora
Classification: Fedora
Component: kdebase-workspace
Version: rawhide
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:d42702c48a4...
Depends On:
TreeView+ depends on / blocked
Reported: 2009-09-03 23:43 UTC by Peter Trenholme
Modified: 2009-09-08 10:48 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-09-08 10:48:08 UTC

Attachments (Terms of Use)

Description Peter Trenholme 2009-09-03 23:43:19 UTC
The following was filed automatically by setroubleshoot:


SELinux is preventing the kdm from using potentially mislabeled files

Detailed Description:

SELinux has denied kdm access to potentially mislabeled file(s)
(/home/Peter/.Xauthority-n). This means that SELinux will not allow kdm to use
these files. It is common for users to edit files in their home directory or tmp
directories and then move (mv) them to system directories. The problem is that
the files end up with the wrong file context which confined applications are not
allowed to access.

Allowing Access:

If you want kdm to access this files, you need to relabel them using restorecon
-v '/home/Peter/.Xauthority-n'. You might want to relabel the entire directory
using restorecon -R -v '/home/Peter'.

Additional Information:

Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:xauth_home_t:s0
Target Objects                /home/Peter/.Xauthority-n [ file ]
Source                        kdm
Source Path                   /usr/bin/kdm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           kdm-4.3.1-1.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.30-2.fc12
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   home_tmp_bad_labels
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31-0.199.rc8.git2.fc12.x86_64
                              #1 SMP Wed Sep 2 20:54:49 EDT 2009 x86_64 x86_64
Alert Count                   2
First Seen                    Thu 03 Sep 2009 04:36:42 PM PDT
Last Seen                     Thu 03 Sep 2009 04:36:50 PM PDT
Local ID                      c6eea014-0e72-45db-ad86-7263dc5839d8
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1252021010.112:105): avc:  denied  { write } for  pid=3687 comm="kdm" name=".Xauthority-n" dev=dm-2 ino=9601 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:xauth_home_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1252021010.112:105): arch=c000003e syscall=85 success=no exit=-13 a0=7fff0c095c30 a1=180 a2=ff80 a3=7fff0c095050 items=0 ppid=3657 pid=3687 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=4 comm="kdm" exe="/usr/bin/kdm" subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

audit2allow suggests:

#============= xdm_t ==============
allow xdm_t xauth_home_t:file write;

Comment 1 Daniel Walsh 2009-09-04 13:32:43 UTC
I will allow this for now, but I do not believe this will work correctly if the file does not exist.

kde should follow the standard set bug gdm to put this xauthority file in a directrory that it knows it can write to rather then the users home dir.  Then 
set the environment variable.  The problem is the .xsession-errors and the .Xauthority file get created by the tool and they need different access labels.

Comment 2 Daniel Walsh 2009-09-08 10:48:08 UTC
Fixed in selinux-policy-3.6.30-5.fc12.noarch

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