Bug 671022 - SELinux is preventing /sbin/consoletype from 'read' accesses on the file /home_private/rick/.xsession-errors.
Summary: SELinux is preventing /sbin/consoletype from 'read' accesses on the file /hom...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:fdb17acf47c...
: 671023 671028 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-19 22:43 UTC by Richard P. Spillane
Modified: 2011-01-20 14:34 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-20 08:59:32 UTC
Type: ---


Attachments (Terms of Use)

Description Richard P. Spillane 2011-01-19 22:43:13 UTC
SELinux is preventing /sbin/consoletype from 'read' accesses on the file /home_private/rick/.xsession-errors.

*****  Plugin catchall_labels (83.8 confidence) suggests  ********************

If you want to allow consoletype to have read access on the .xsession-errors file
Then you need to change the label on /home_private/rick/.xsession-errors
Do
# semanage fcontext -a -t FILE_TYPE '/home_private/rick/.xsession-errors'
where FILE_TYPE is one of the following: anon_inodefs_t, sysctl_crypto_t, user_cron_spool_t, consoletype_exec_t, abrt_t, lib_t, afs_cache_t, abrt_helper_exec_t, ld_so_t, textrel_shlib_t, rpm_script_tmp_t, etc_t, consoletype_t, ld_so_cache_t, printconf_t, proc_xen_t, abrt_var_run_t, pam_var_run_t. 
Then execute: 
restorecon -v '/home_private/rick/.xsession-errors'


*****  Plugin catchall (17.1 confidence) suggests  ***************************

If you believe that consoletype should be allowed read access on the .xsession-errors file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep consoletype /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:consoletype_t:s0
Target Context                system_u:object_r:default_t:s0
Target Objects                /home_private/rick/.xsession-errors [ file ]
Source                        consoletype
Source Path                   /sbin/consoletype
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           initscripts-9.20.1-1.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-20.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.35.6-45.fc14.x86_64 #1 SMP Mon Oct 18 23:57:44
                              UTC 2010 x86_64 x86_64
Alert Count                   2
First Seen                    Wed 19 Jan 2011 05:41:28 PM EST
Last Seen                     Wed 19 Jan 2011 05:41:49 PM EST
Local ID                      d63570f5-4608-4518-a5cd-3fcd84b7d190

Raw Audit Messages
type=AVC msg=audit(1295476909.785:247): avc:  denied  { read } for  pid=18918 comm="consoletype" path="/home_private/rick/.xsession-errors" dev=dm-2 ino=10092675 scontext=unconfined_u:system_r:consoletype_t:s0 tcontext=system_u:object_r:default_t:s0 tclass=file

consoletype,consoletype_t,default_t,file,read
type=AVC msg=audit(1295476909.785:247): avc:  denied  { read append } for  pid=18918 comm="consoletype" path="/home_private/rick/.xsession-errors" dev=dm-2 ino=10092675 scontext=unconfined_u:system_r:consoletype_t:s0 tcontext=system_u:object_r:default_t:s0 tclass=file

consoletype,consoletype_t,default_t,file,read
type=SYSCALL msg=audit(1295476909.785:247): arch=x86_64 syscall=execve success=yes exit=0 a0=22bec20 a1=22bf3e0 a2=22c1220 a3=7fffad288030 items=0 ppid=18917 pid=18918 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=9 comm=consoletype exe=/sbin/consoletype subj=unconfined_u:system_r:consoletype_t:s0 key=(null)
consoletype,consoletype_t,default_t,file,read

#============= consoletype_t ==============
allow consoletype_t default_t:file { read append };

Comment 1 Miroslav Grepl 2011-01-20 08:57:47 UTC
You need to tell SELinux to label /home_private dir as /home dir. Execute

# semanage fcontext -a -e /home /home_private
# restorecon -R -v /home_private

Will fix.

Comment 2 Miroslav Grepl 2011-01-20 08:58:25 UTC
*** Bug 671023 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2011-01-20 08:58:50 UTC
*** Bug 671028 has been marked as a duplicate of this bug. ***

Comment 4 Richard P. Spillane 2011-01-20 14:34:10 UTC
Thank you Miroslav, I did what you said and hopefully it will work.  It looks as though SELinux needs to be told that /home moved to /home_private based on what you are saying.  Thank you.


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