Bug 505850 - SELinux is preventing ntpd (ntpd_t) "write" to /home/jwi/.xsession-errors (user_home_t).
SELinux is preventing ntpd (ntpd_t) "write" to /home/jwi/.xsession-errors (us...
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
11
All Linux
low Severity low
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-14 06:38 EDT by Juergen Wieczorek
Modified: 2009-06-15 15:08 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:51:41 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:38:06 EDT
Description of problem:


Zusammenfassung:

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

Detaillierte Beschreibung:

SELinux denied access requested by ntpd. /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:ntpd_t:s0
Zielkontext                   unconfined_u:object_r:user_home_t:s0
Zielobjekte                   /home/jwi/.xsession-errors [ file ]
Quelle                        ntpd
Quellen-Pfad                  /usr/sbin/ntpd
Port                          <Unbekannt>
Host                          marvin42.local
Quellen-RPM-Pakete            ntp-4.2.4p6-4.fc11
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             2
Zuerst gesehen                Sa 13 Jun 2009 23:21:56 CEST
Zuletzt gesehen               Sa 13 Jun 2009 23:22:17 CEST
Lokale ID                     26ef4ef6-0faa-4f64-951a-09855917886c
Zeilennummern                 

Raw-Audit-Meldungen           

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

node=marvin42.local type=SYSCALL msg=audit(1244928137.60:48): arch=c000003e syscall=59 success=yes exit=0 a0=1aadbb0 a1=1aae6e0 a2=1aac980 a3=7fff36144760 items=0 ppid=3993 pid=3994 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=2 comm="ntpd" exe="/usr/sbin/ntpd" subj=unconfined_u:system_r:ntpd_t:s0 key=(null)
Comment 1 Miroslav Grepl 2009-06-15 00:51:41 EDT
This is a mislabeled file.

execute:

# restorecon -R -v /home/jwi/.xsession-errors
Comment 2 Daniel Walsh 2009-06-15 15:08:36 EDT
Are you running kde?  If you log out and log back in, does everything work?  Is the file still labeled xdm_home_t?

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