Bug 671023

Summary: SELinux is preventing /usr/libexec/polkit-1/polkit-agent-helper-1 from read, append access on the file /home_private/rick/.xsession-errors.
Product: [Fedora] Fedora Reporter: Richard P. Spillane <necro351>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:d779720d84e794781fbc30b44fa13724ad5bdecf399583b4aa6bb66197aeab44
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-20 08:58:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Richard P. Spillane 2011-01-19 22:48:30 UTC
SELinux is preventing /usr/libexec/polkit-1/polkit-agent-helper-1 from read, append access on the file /home_private/rick/.xsession-errors.

*****  Plugin catchall_labels (71.9 confidence) suggests  ********************

If you want to allow polkit-agent-helper-1 to have read append 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: policykit_auth_t, policykit_var_lib_t, policykit_var_run_t, user_cron_spool_t, faillog_t, policykit_reload_t, pcscd_var_run_t, policykit_tmp_t, root_t. 
Then execute: 
restorecon -v '/home_private/rick/.xsession-errors'


*****  Plugin leaks (14.7 confidence) suggests  ******************************

If you want to ignore polkit-agent-helper-1 trying to read append access the .xsession-errors file, because you believe it should not need this access.
Then you should report this as a bug.  
You can generate a local policy module to dontaudit this access.
Do
# grep /usr/libexec/polkit-1/polkit-agent-helper-1 /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

*****  Plugin catchall (14.7 confidence) suggests  ***************************

If you believe that polkit-agent-helper-1 should be allowed read append 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 polkit-agent-he /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:policykit_auth_t:s0-s0:c
                              0.c1023
Target Context                system_u:object_r:default_t:s0
Target Objects                /home_private/rick/.xsession-errors [ file ]
Source                        polkit-agent-he
Source Path                   /usr/libexec/polkit-1/polkit-agent-helper-1
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           polkit-0.98-4.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                   1
First Seen                    Wed 19 Jan 2011 05:47:14 PM EST
Last Seen                     Wed 19 Jan 2011 05:47:14 PM EST
Local ID                      008ff6ef-89d7-4aa0-a3bb-e2def2daea0e

Raw Audit Messages
type=AVC msg=audit(1295477234.57:267): avc:  denied  { read append } for  pid=19456 comm="polkit-agent-he" path="/home_private/rick/.xsession-errors" dev=dm-2 ino=10092675 scontext=unconfined_u:unconfined_r:policykit_auth_t:s0-s0:c0.c1023 tcontext=system_u:object_r:default_t:s0 tclass=file

polkit-agent-he,policykit_auth_t,default_t,file,read,append
type=SYSCALL msg=audit(1295477234.57:267): arch=x86_64 syscall=execve success=yes exit=0 a0=3734c06798 a1=7fff2c421aa0 a2=7fff2c421d78 a3=7fff2c421580 items=0 ppid=17863 pid=19456 auid=500 uid=500 gid=500 euid=0 suid=0 fsuid=0 egid=500 sgid=500 fsgid=500 tty=(none) ses=9 comm=polkit-agent-he exe=/usr/libexec/polkit-1/polkit-agent-helper-1 subj=unconfined_u:unconfined_r:policykit_auth_t:s0-s0:c0.c1023 key=(null)
polkit-agent-he,policykit_auth_t,default_t,file,read,append

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

Comment 1 Miroslav Grepl 2011-01-20 08:58:25 UTC

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