Bug 543417

Summary: SELinux is preventing the semodule from using potentially mislabeled files (/root/.xsession-errors).
Product: [Fedora] Fedora Reporter: Iftikhar <rana.iftikhar.ahmad>
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: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:848413af8cd035bca9176747ea3b32676ff639b1efee7fa1248d96da6b021bb5
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-02 11:17:04 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 Iftikhar 2009-12-02 11:08:49 UTC
Summary:

SELinux is preventing the semodule from using potentially mislabeled files
(/root/.xsession-errors).

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux has denied semodule access to potentially mislabeled file(s)
(/root/.xsession-errors). This means that SELinux will not allow semodule 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 semodule to access this files, you need to relabel them using
restorecon -v '/root/.xsession-errors'. You might want to relabel the entire
directory using restorecon -R -v '/root'.

Additional Information:

Source Context                unconfined_u:unconfined_r:semanage_t:s0-s0:c0.c102
                              3
Target Context                unconfined_u:object_r:admin_home_t:s0
Target Objects                /root/.xsession-errors [ file ]
Source                        semodule
Source Path                   /usr/sbin/semodule
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           policycoreutils-2.0.57-17.fc10
Target RPM Packages           
Policy RPM                    selinux-policy-3.5.13-48.fc10
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   home_tmp_bad_labels
Host Name                     (removed)
Platform                      Linux (removed) 2.6.27.19-170.2.35.fc10.i686
                              #1 SMP Mon Feb 23 13:21:22 EST 2009 i686 i686
Alert Count                   3
First Seen                    Mon 23 Mar 2009 01:58:10 PM GMT
Last Seen                     Mon 23 Mar 2009 02:00:03 PM GMT
Local ID                      9dd42eb3-585b-46c4-a918-eb870c875cfd
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1237816803.305:26): avc:  denied  { write } for  pid=3335 comm="semodule" path="/root/.xsession-errors" dev=dm-0 ino=24109137 scontext=unconfined_u:unconfined_r:semanage_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1237816803.305:26): arch=40000003 syscall=11 success=yes exit=0 a0=8524ff0 a1=85251e8 a2=85245c0 a3=0 items=0 ppid=3330 pid=3335 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="semodule" exe="/usr/sbin/semodule" subj=unconfined_u:unconfined_r:semanage_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  selinux-policy-3.5.13-48.fc10,home_tmp_bad_labels,semodule,semanage_t,admin_home_t,file,write
audit2allow suggests:

#============= semanage_t ==============
allow semanage_t admin_home_t:file write;

Comment 1 Miroslav Grepl 2009-12-02 11:17:04 UTC

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