Bug 505850

Summary: SELinux is preventing ntpd (ntpd_t) "write" to /home/jwi/.xsession-errors (user_home_t).
Product: [Fedora] Fedora Reporter: Juergen Wieczorek <juergenw_>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 11CC: dwalsh, identifiedcall02, jkubin, mgrepl, sabalevaishali222
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-15 04:51:41 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 Juergen Wieczorek 2009-06-14 10:38:06 UTC
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 04:51:41 UTC
This is a mislabeled file.

execute:

# restorecon -R -v /home/jwi/.xsession-errors

Comment 2 Daniel Walsh 2009-06-15 19:08:36 UTC
Are you running kde?  If you log out and log back in, does everything work?  Is the file still labeled xdm_home_t?

Comment 3 Identified Call 2021-07-03 09:21:53 UTC Comment hidden (spam)
Comment 4 saba 2022-08-16 06:33:58 UTC Comment hidden (spam)
Comment 5 saba 2022-08-16 13:59:35 UTC Comment hidden (spam)