Bug 562206

Summary: SELinux is preventing updatedb (locate_t) "getattr" to /root/.gconf (unlabeled_t).
Product: [Fedora] Fedora Reporter: Oliver Ruebenacker <curoli>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: curoli, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:799985b7f8422cedf94bb7ce070d0d0c160d03ca43725b04a60d6b4219699cf0
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-05 16:10:17 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 Oliver Ruebenacker 2010-02-05 15:56:27 UTC
Summary:

SELinux is preventing updatedb (locate_t) "getattr" to /root/.gconf
(unlabeled_t).

Detailed Description:

SELinux denied access requested by updatedb. /root/.gconf may be a mislabeled.
/root/.gconf default SELinux type is gconf_home_t, but its current type is
unlabeled_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.

Allowing Access:

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

Fix Command:

restorecon '/root/.gconf'

Additional Information:

Source Context                system_u:system_r:locate_t:SystemLow-SystemHigh
Target Context                system_u:object_r:unlabeled_t:SystemLow
Target Objects                /root/.gconf [ dir ]
Source                        updatedb
Source Path                   /usr/bin/updatedb
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           mlocate-0.21.1-1
Target RPM Packages           
Policy RPM                    selinux-policy-3.5.13-61.fc10
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   restorecon
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.27.24-170.2.68_1.cubbi_tuxonice.fc10.i686 #1
                              SMP Sat May 30 16:02:33 CEST 2009 i686 i686
Alert Count                   12
First Seen                    Mon 26 Jan 2009 04:09:19 AM EST
Last Seen                     Sun 21 Jun 2009 04:10:26 AM EDT
Local ID                      e80cacb6-7755-41f2-af05-f2ee014572e6
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1245571826.346:175): avc:  denied  { getattr } for  pid=15191 comm="updatedb" path="/root/.gconf" dev=dm-0 ino=5570570 scontext=system_u:system_r:locate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1245571826.346:175): arch=40000003 syscall=196 success=no exit=-13 a0=8ccd681 a1=bfcbbfc8 a2=27fff4 a3=8ccd681 items=0 ppid=15185 pid=15191 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=24 comm="updatedb" exe="/usr/bin/updatedb" subj=system_u:system_r:locate_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  selinux-policy-3.5.13-61.fc10,restorecon,updatedb,locate_t,unlabeled_t,dir,getattr
audit2allow suggests:

#============= locate_t ==============
allow locate_t unlabeled_t:dir getattr;

Comment 1 Daniel Walsh 2010-02-05 16:10:17 UTC

*** This bug has been marked as a duplicate of bug 538428 ***