Bug 748284

Summary: SELinux is preventing polkit-agent-he from 'write' accesses on the file /home/ROMANOV/mjanthony/.xsession-errors.
Product: [Fedora] Fedora Reporter: Mike Anthony <benzslk550>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:d36c9df454e265a8e31c29c815521ba77798171f3a52f036e05a24cd453c9931
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-24 05:51:58 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 Mike Anthony 2011-10-23 23:08:19 UTC
SELinux is preventing polkit-agent-he from 'write' accesses on the file /home/ROMANOV/mjanthony/.xsession-errors.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that polkit-agent-he should be allowed write 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                unconfined_u:object_r:user_home_t:s0
Target Objects                /home/ROMANOV/mjanthony/.xsession-errors [ file ]
Source                        polkit-agent-he
Source Path                   polkit-agent-he
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-39.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux fedora-lpt.romanov.anthonyconsulting.net
                              2.6.40.6-0.fc15.x86_64 #1 SMP Tue Oct 4 00:39:50
                              UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Sun 23 Oct 2011 05:44:04 PM CDT
Last Seen                     Sun 23 Oct 2011 05:44:04 PM CDT
Local ID                      99aa6861-5980-46f3-a0aa-d51f26d69674

Raw Audit Messages
type=AVC msg=audit(1319409844.141:119): avc:  denied  { write } for  pid=3244 comm="polkit-agent-he" path="/home/ROMANOV/mjanthony/.xsession-errors" dev=dm-2 ino=262153 scontext=unconfined_u:unconfined_r:policykit_auth_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file


Hash: polkit-agent-he,policykit_auth_t,user_home_t,file,write

audit2allow

#============= policykit_auth_t ==============
#!!!! This avc is allowed in the current policy

allow policykit_auth_t user_home_t:file write;

audit2allow -R

#============= policykit_auth_t ==============
#!!!! This avc is allowed in the current policy

allow policykit_auth_t user_home_t:file write;

Comment 1 Miroslav Grepl 2011-10-24 05:51:58 UTC
You will need to say the policy how /home/ROMANOV/mjanthony should be labelled using "semanage"

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