Bug 745639 - SELinux is preventing /usr/sbin/httpd from 'search' accesses on the directory cobbler.
Summary: SELinux is preventing /usr/sbin/httpd from 'search' accesses on the directory...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: cobbler
Version: 15
Hardware: i386
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Scott J Henson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:74fd8a158c9...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-12 21:39 UTC by Robert Hancock
Modified: 2011-12-09 17:30 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-09 17:30:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Robert Hancock 2011-10-12 21:39:41 UTC
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 22:07:32 UTC
Adding the custom policy module to allow this works around the problem for me.

Comment 2 Daniel Walsh 2011-10-13 14:45:48 UTC
Any idea why apache would be searching through the cobbler log directory?  Was anything actually blocked?

Comment 3 Michael Cronenworth 2011-10-13 14:49:58 UTC
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 14:55:17 UTC
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 15:07:26 UTC
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 17:30:36 UTC
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.