Bug 714949

Summary: AVC: ERROR LOG FILE: Couldn't open log file /var/log/rhn/rhn_proxy_redirect.log
Product: Red Hat Satellite Proxy 5 Reporter: Jan Pazdziora <jpazdziora>
Component: ServerAssignee: Michael Mráka <mmraka>
Status: CLOSED DEFERRED QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 541CC: cperry
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-04 13:25:40 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:
Bug Depends On:    
Bug Blocks: 462714    

Description Jan Pazdziora 2011-06-21 12:04:27 UTC
Description of problem:

When kickstarting RHEL 6 guest via RHN Proxy 5.4.1 on RHEL 6 from RHN Satellite 5.4.1 on RHEL 6, I get the following error in /var/log/httpd/error_log:

[Tue Jun 21 07:54:26 2011] [error] RHN 15434 2011/06/21 07:54:26 -04:00: ERROR LOG FILE: Couldn't open log file /var/log/rhn/rhn_proxy_redirect.log
[Tue Jun 21 07:54:26 2011] [error] RHN 15434 2011/06/21 07:54:26 -04:00: (<type 'exceptions.OSError'>, OSError(13, 'Permission denied'))

In the audit.log, I find

type=AVC msg=audit(1308650223.639:112601): avc:  denied  { setattr } for  pid=15436 comm="httpd" name="rhn_proxy_broker.log" dev=dm-0 ino=2230288 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:spacewalk_proxy_httpd_log_t:s0 tclass=file
type=AVC msg=audit(1308657266.509:112686): avc:  denied  { setattr } for  pid=15434 comm="httpd" name="rhn_proxy_redirect.log" dev=dm-0 ino=2230307 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:spacewalk_proxy_httpd_log_t:s0 tclass=file

Version-Release number of selected component (if applicable):

# rpm -qf /usr/share/rhn/wsgi/xmlrpc.py
spacewalk-proxy-common-1.2.2-11.el6sat.noarch

How reproducible:

Seen once.

Steps to Reproduce:
1. Have Satellite, RHN Proxy, and guest on RHEL 6.
2. Sync RHEL 6 channel, register that proxy machine, install proxy, register the guest machine via proxy, create kickstart, schedule kickstart of that guest via that proxy.
3. Do tail -f /var/log/httpd/error_log.
  
Actual results:

[Tue Jun 21 07:54:26 2011] [error] RHN 15434 2011/06/21 07:54:26 -04:00: ERROR LOG FILE: Couldn't open log file /var/log/rhn/rhn_proxy_redirect.log
[Tue Jun 21 07:54:26 2011] [error] RHN 15434 2011/06/21 07:54:26 -04:00: (<type 'exceptions.OSError'>, OSError(13, 'Permission denied'))

in the log and some AVC denials in the audit.log.

Expected results:

No such errors.

Additional info: