Bug 505852 - SELinux is preventing consoletype (consoletype_t) "write" to /home/jwi/.xsession-errors (user_home_t).
SELinux is preventing consoletype (consoletype_t) "write" to /home/jwi/.xsess...
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
11
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-14 06:42 EDT by Juergen Wieczorek
Modified: 2009-06-15 15:12 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-15 00:53:23 EDT
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 Juergen Wieczorek 2009-06-14 06:42:58 EDT
Description of problem:


Zusammenfassung:

SELinux is preventing consoletype (consoletype_t) "write" to
/home/jwi/.xsession-errors (user_home_t).

Detaillierte Beschreibung:

SELinux denied access requested by consoletype. /home/jwi/.xsession-errors may
be a mislabeled. /home/jwi/.xsession-errors default SELinux type is xdm_home_t,
but its current type is user_home_t. Changing this file back to the default
type, may fix your problem.

File contexts can be assigned to a file in the following ways.

  * Files created in a directory receive the file context of the parent
    directory by default.
  * The SELinux policy might override the default label inherited from the
    parent directory by specifying a process running in context A which creates
    a file in a directory labeled B will instead create the file with label C.
    An example of this would be the dhcp client running with the dhclient_t type
    and creates a file in the directory /etc. This file would normally receive
    the etc_t type due to parental inheritance but instead the file is labeled
    with the net_conf_t type because the SELinux policy specifies this.
  * Users can change the file context on a file using tools such as chcon, or
    restorecon.

This file could have been mislabeled either by user error, or if an normally
confined application was run under the wrong domain.

However, this might also indicate a bug in SELinux because the file should not
have been labeled with this type.

If you believe this is a bug, please file a bug report
(http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against this package.

Zugriff erlauben:

You can restore the default system context to this file by executing the
restorecon command. restorecon '/home/jwi/.xsession-errors', if this file is a
directory, you can recursively restore using restorecon -R
'/home/jwi/.xsession-errors'.

Fixer Befehl:

restorecon '/home/jwi/.xsession-errors'

Zusätzliche Informationen:

Quellkontext                  unconfined_u:system_r:consoletype_t:s0
Zielkontext                   unconfined_u:object_r:user_home_t:s0
Zielobjekte                   /home/jwi/.xsession-errors [ file ]
Quelle                        consoletype
Quellen-Pfad                  /sbin/consoletype
Port                          <Unbekannt>
Host                          marvin42.local
Quellen-RPM-Pakete            initscripts-8.95-1
Ziel-RPM-Pakete               
RPM-Richtlinie                selinux-policy-3.6.12-39.fc11
SELinux aktiviert             True
Richtlinienversion            targeted
MLS aktiviert                 True
Enforcing-Modus               Enforcing
Plugin-Name                   restorecon
Hostname                      marvin42.local
Plattform                     Linux marvin42.local 2.6.29.4-167.fc11.x86_64 #1
                              SMP Wed May 27 17:27:08 EDT 2009 x86_64 x86_64
Anzahl der Alarme             8
Zuerst gesehen                Sa 13 Jun 2009 23:20:40 CEST
Zuletzt gesehen               Sa 13 Jun 2009 23:22:27 CEST
Lokale ID                     d017267f-2f91-4189-86d1-53ad10d4c428
Zeilennummern                 

Raw-Audit-Meldungen           

node=marvin42.local type=AVC msg=audit(1244928147.961:53): avc:  denied  { write } for  pid=4035 comm="consoletype" path="/home/jwi/.xsession-errors" dev=sda8 ino=4923405 scontext=unconfined_u:system_r:consoletype_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file

node=marvin42.local type=SYSCALL msg=audit(1244928147.961:53): arch=c000003e syscall=59 success=yes exit=0 a0=14dfcc0 a1=14dfd20 a2=14df890 a3=7fff089f3600 items=0 ppid=4034 pid=4035 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=2 comm="consoletype" exe="/sbin/consoletype" subj=unconfined_u:system_r:consoletype_t:s0 key=(null)
Comment 1 Miroslav Grepl 2009-06-15 00:53:23 EDT
This is a mislabeled file.

execute:

# restorecon -R -v /home/jwi/.xsession-errors
Comment 2 Daniel Walsh 2009-06-15 15:12:09 EDT
Are you running kde for login?

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