This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 745639 - SELinux is preventing /usr/sbin/httpd from 'search' accesses on the directory cobbler.
SELinux is preventing /usr/sbin/httpd from 'search' accesses on the directory...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: cobbler (Show other bugs)
15
i386 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Scott J Henson
Fedora Extras Quality Assurance
setroubleshoot_trace_hash:74fd8a158c9...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-12 17:39 EDT by Robert Hancock
Modified: 2011-12-09 12:30 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-09 12:30:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Robert Hancock 2011-10-12 17:39:41 EDT
SELinux is preventing /usr/sbin/httpd from 'search' accesses on the directory cobbler.

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

If you believe that httpd should be allowed search access on the cobbler directory 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 httpd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:object_r:cobbler_var_log_t:s0
Target Objects                cobbler [ dir ]
Source                        httpd
Source Path                   /usr/sbin/httpd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           httpd-2.2.21-1.fc15
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 (removed) 2.6.40.6-0.fc15.i686 #1 SMP Tue Oct 4
                              00:51:19 UTC 2011 i686 i686
Alert Count                   4
First Seen                    Wed 12 Oct 2011 09:25:29 PM UTC
Last Seen                     Wed 12 Oct 2011 09:34:50 PM UTC
Local ID                      d2b463d0-c068-4324-b011-deaf7b98945c

Raw Audit Messages
type=AVC msg=audit(1318455290.19:68): avc:  denied  { search } for  pid=1084 comm="httpd" name="cobbler" dev=dm-1 ino=395633 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:cobbler_var_log_t:s0 tclass=dir


type=SYSCALL msg=audit(1318455290.19:68): arch=i386 syscall=open success=no exit=EACCES a0=223f3310 a1=8441 a2=1b6 a3=0 items=0 ppid=1049 pid=1084 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm=httpd exe=/usr/sbin/httpd subj=system_u:system_r:httpd_t:s0 key=(null)

Hash: httpd,httpd_t,cobbler_var_log_t,dir,search

audit2allow

#============= httpd_t ==============
allow httpd_t cobbler_var_log_t:dir search;

audit2allow -R

#============= httpd_t ==============
allow httpd_t cobbler_var_log_t:dir search;
Comment 1 Michael Cronenworth 2011-10-12 18:07:32 EDT
Adding the custom policy module to allow this works around the problem for me.
Comment 2 Daniel Walsh 2011-10-13 10:45:48 EDT
Any idea why apache would be searching through the cobbler log directory?  Was anything actually blocked?
Comment 3 Michael Cronenworth 2011-10-13 10:49:58 EDT
I do not know the particular part of code in cobbler that is calling for this search, but I do now that when it is blocked that the kickstart file is not able to be read and I cannot install RHEL.
Comment 4 Robert Hancock 2011-10-13 10:55:17 EDT
For me this showed up when trying to load the cobbler web UI. There was a Python error trace that came up which unfortunately I don't currently have. It seems like it was trying to either open or write cobbler.log.
Comment 5 Daniel Walsh 2011-10-13 11:07:26 EDT
I guess we can assign this to cobbler for now, to see if they have any ideas.  I have no problem adding the access, but it feels like this is a bug.
Comment 6 Michael Cronenworth 2011-12-09 12:30:36 EST
This is fixed in cobbler 2.2 that is currently in updates-testing, but version 2.2 requires different policy changes. See bug 765916.

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