<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>81365</bug_id>
          
          <creation_ts>2005-02-09 06:36 0000</creation_ts>
          <short_desc>sec-policy/selinux-apache changes for apache-2.0.52-r3</short_desc>
          <delta_ts>2005-02-11 12:41:58 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Hardened</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>soeren.lorenz@web.de</reporter>
          <assigned_to>kaiowas@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>soeren.lorenz@web.de</who>
            <bug_when>2005-02-09 06:36:49 0000</bug_when>
            <thetext>Note: 2.0.52-r3 is currently hard masked. So this is somewhat work in advance.

The filenames of the executables changed to the following:

/usr/sbin # ls -la apache*
lrwxrwxrwx  apache2 -&gt; /usr/sbin/apache2.prefork
-rwxr-xr-x  apache2.prefork
-rwxr-xr-x  apache2ctl
-rwxr-xr-x  apache2logserverstatus
-rwxr-xr-x  apache2splitlogfile

So they don&apos;t get labeled correctly anymore. This line in apache.fc should take care of httpd itself, without relabeling the support programs:

  /usr/sbin/apache(2)?(\.+.*)?                  system_u:object_r:httpd_exec_t

Further, the directive

  SSLMutex  file:logs/ssl_mutex

should be changed to

  SSLMutex  file:/var/cache/apache2/ssl_mutex

in

  /etc/apache2/modules.d/40_mod_ssl.conf

by the apache maintainers to work with the current policy.

Regards,

S</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>soeren.lorenz@web.de</who>
            <bug_when>2005-02-09 06:36:49 0000</bug_when>
            <thetext>Note: 2.0.52-r3 is currently hard masked. So this is somewhat work in advance.

The filenames of the executables changed to the following:

/usr/sbin # ls -la apache*
lrwxrwxrwx  apache2 -&gt; /usr/sbin/apache2.prefork
-rwxr-xr-x  apache2.prefork
-rwxr-xr-x  apache2ctl
-rwxr-xr-x  apache2logserverstatus
-rwxr-xr-x  apache2splitlogfile

So they don&apos;t get labeled correctly anymore. This line in apache.fc should take care of httpd itself, without relabeling the support programs:

  /usr/sbin/apache(2)?(\.+.*)?                  system_u:object_r:httpd_exec_t

Further, the directive

  SSLMutex  file:logs/ssl_mutex

should be changed to

  SSLMutex  file:/var/cache/apache2/ssl_mutex

in

  /etc/apache2/modules.d/40_mod_ssl.conf

by the apache maintainers to work with the current policy.

Regards,

Sören Lorenz</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>soeren.lorenz@web.de</who>
            <bug_when>2005-02-09 14:57:59 0000</bug_when>
            <thetext>Correction: The symlink to the binary should not be labeled httpd_exec_t because the daemon_domain macro doesn&apos;t allow reading symlinks of *_exec_t. So the line has to be:

  /usr/sbin/apache(2)?\.+.*               system_u:object_r:httpd_exec_t

Regards,

S</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>soeren.lorenz@web.de</who>
            <bug_when>2005-02-09 14:57:59 0000</bug_when>
            <thetext>Correction: The symlink to the binary should not be labeled httpd_exec_t because the daemon_domain macro doesn&apos;t allow reading symlinks of *_exec_t. So the line has to be:

  /usr/sbin/apache(2)?\.+.*               system_u:object_r:httpd_exec_t

Regards,

Sören Lorenz</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>soeren.lorenz@web.de</who>
            <bug_when>2005-02-11 10:15:23 0000</bug_when>
            <thetext>[11:01]&lt;DocSoLo&gt; is it possible that bug 65053 is true again for apache-2.0.52-r3?
...
[11:03]&lt;Hollow&gt; though mutex seems to be in logs again
[11:04]&lt;DocSoLo&gt; Hollow yep, thats what I was talking about
[11:05]&lt;DocSoLo&gt; this causes problems under SELinux
[11:05]&lt;Hollow&gt; DocSoLo: fixed in cvs. thx
[11:05]&lt;DocSoLo&gt; in this environment httpd is not allowed to delete its logfiles, it can only append to it
[11:06]&lt;DocSoLo&gt; fine. thanks! 
...
[11:25]&lt;DocSoLo&gt; Hollow this wrong mutex path would possibly also come true for the apache-1.3.x ebuilds, though i don&apos;t use them
...
[11:39]&lt;DocSoLo&gt; anyway if it has been like this in current 1.3.x ebuilds its okay because i know at least one selinux dev who uses apache-1.3.x in production under selinux - he would have complained already
[11:40]&lt;Hollow&gt; ok, fine then
[11:41]&lt;DocSoLo&gt; yep, thanks for the quick response
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kaiowas@gentoo.org</who>
            <bug_when>2005-02-11 12:41:58 0000</bug_when>
            <thetext>many thanks for the bug report and for the envolvment

fixed in CVS and in &gt;=selinux-apache-20050211.ebuild
</thetext>
          </long_desc>
      
    </bug>

</bugzilla>