OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   08-Sep-2005 09:23:32
  Branch: OPENPKG_2_4_SOLID                Handle: 2005090808233200

  Added files:              (Branch: OPENPKG_2_4_SOLID)
    openpkg-src/apache      apache.patch.suphp
  Modified files:           (Branch: OPENPKG_2_4_SOLID)
    openpkg-src/apache      apache.base apache.spec

  Log:
    MFC: all suPHP related bugfixes and improvements

  Summary:
    Revision    Changes     Path
    1.14.2.1    +1  -0      openpkg-src/apache/apache.base
    1.2.2.1     +39 -0      openpkg-src/apache/apache.patch.suphp
    1.297.2.3   +19 -3      openpkg-src/apache/apache.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/apache/apache.base
  ============================================================================
  $ cvs diff -u -r1.14 -r1.14.2.1 apache.base
  --- openpkg-src/apache/apache.base    14 May 2005 20:41:42 -0000      1.14
  +++ openpkg-src/apache/apache.base    8 Sep 2005 07:23:32 -0000       1.14.2.1
  @@ -239,6 +239,7 @@
   <IfModule mod_suphp.c>
       suPHP_Engine      on
       suPHP_ConfigPath  @l_prefix@/etc/php
  +    suPHP_AddHandler  x-httpd-php
       AddHandler        x-httpd-php .suphp
   </IfModule>
   
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/apache/apache.patch.suphp
  ============================================================================
  $ cvs diff -u -r0 -r1.2.2.1 apache.patch.suphp
  --- /dev/null 2005-09-08 09:23:29 +0200
  +++ apache.patch.suphp        2005-09-08 09:23:32 +0200
  @@ -0,0 +1,39 @@
  +Index: src/Configuration.cpp
  +--- src/Configuration.cpp.orig       2005-02-27 18:53:05 +0100
  ++++ src/Configuration.cpp    2005-09-07 13:31:39 +0200
  +@@ -21,6 +21,8 @@
  + #include <string>
  + #include <vector>
  + 
  ++#include "config.h"
  ++
  + #include "IniFile.hpp"
  + #include "Util.hpp"
  + 
  +@@ -81,7 +83,11 @@
  + }
  + 
  + suPHP::Configuration::Configuration() {
  ++#ifdef OPT_LOGFILE
  ++    this->logfile = OPT_LOGFILE;
  ++#else
  +     this->logfile = "/var/log/suphp.log";
  ++#endif
  + #ifdef OPT_APACHE_USER
  +     this->webserver_user = OPT_APACHE_USER;
  + #else
  +Index: src/apache/mod_suphp.c
  +--- src/apache/mod_suphp.c.orig      2005-02-27 18:56:37 +0100
  ++++ src/apache/mod_suphp.c   2005-09-07 13:32:19 +0200
  +@@ -249,9 +249,9 @@
  +     {"suPHP_UserGroup", suphp_handle_cmd_user_group, NULL, 
  +      RSRC_CONF|ACCESS_CONF, TAKE2, "User and group scripts shall be run 
as"},
  + #endif 
  +-    {"suPHP_AddHandler", suphp_handle_cmd_add_handler, NULL, ACCESS_CONF,
  ++    {"suPHP_AddHandler", suphp_handle_cmd_add_handler, NULL, 
RSRC_CONF|ACCESS_CONF,
  +      ITERATE, "Tells mod_suphp to handle these MIME-types"},
  +-    {"suphp_RemoveHandler", suphp_handle_cmd_remove_handler, NULL, 
ACCESS_CONF,
  ++    {"suphp_RemoveHandler", suphp_handle_cmd_remove_handler, NULL, 
RSRC_CONF|ACCESS_CONF,
  +      ITERATE, "Tells mod_suphp not to handle these MIME-types"},
  +     {NULL}
  + };
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/apache/apache.spec
  ============================================================================
  $ cvs diff -u -r1.297.2.2 -r1.297.2.3 apache.spec
  --- openpkg-src/apache/apache.spec    2 Sep 2005 21:14:51 -0000       
1.297.2.2
  +++ openpkg-src/apache/apache.spec    8 Sep 2005 07:23:32 -0000       
1.297.2.3
  @@ -65,7 +65,7 @@
   Group:        Web
   License:      ASF
   Version:      %{V_apache}
  -Release:      2.4.1
  +Release:      2.4.2
   
   #   package options (suexec related)
   %option       with_suexec               yes
  @@ -76,6 +76,8 @@
   %option       with_suphp                no
   %option       with_suphp_caller         %{l_nusr}
   %option       with_suphp_phpcgi         %{l_prefix}/cgi/php
  +%option       with_suphp_ugid_mode      paranoid
  +%option       with_suphp_ugid_check     yes
   
   #   package options (additionally used Apache modules; can be enabled 
without thinking)
   %option       with_mod_ssl              no
  @@ -212,6 +214,7 @@
   Patch2:       apache.patch.php
   Patch3:       
http://www.hardened-php.net/hardened-php-%{V_mod_php_hardened}.patch.gz
   Patch4:       apache.patch.modssl
  +Patch5:       apache.patch.suphp
   
   #   build information
   Prefix:       %{l_prefix}
  @@ -569,6 +572,7 @@
   %endif
   %if "%{with_suphp}" == "yes"
       %setup -q -T -D -a 17
  +    %patch -p0 -d suphp-%{V_suphp} -P 5
   %endif
   %if "%{with_mod_security}" == "yes"
       %setup -q -T -D -a 18
  @@ -1001,10 +1005,16 @@
         CFLAGS="%{l_cflags -O}" \
         ./configure \
             --prefix=%{l_prefix} \
  +          --sysconfdir=%{l_prefix}/etc/apache \
             --with-apxs="" \
             --with-apache-user=%{with_suphp_caller} \
             --with-php=%{with_suphp_phpcgi} \
  -          --with-logfile=%{l_prefix}/var/apache/log/suphp.log
  +          --with-logfile=%{l_prefix}/var/apache/log/suphp.log \
  +%if "%{with_suphp_ugid_check}" == "no"
  +          --disable-checkuid \
  +          --disable-checkgid \
  +%endif
  +          --with-setid-mode=%{with_suphp_ugid_mode}
         %{l_make} %{l_mflags -O}
       ) || exit $?
   %endif
  @@ -1077,7 +1087,7 @@
         libs="$libs -limap -lmodphp4 -limap"
   %endif
   %if "%{with_suphp}" == "yes"
  -      cflags="$cflags -DPATH_TO_SUPHP='\"%{l_prefix}/sbin/suphp\"'"
  +      cflags="$cflags -DSUPHP_PATH_TO_SUPHP='\"%{l_prefix}/sbin/suphp\"'"
   %endif
         CC="%{l_cc}" \
         CFLAGS="$cflags" \
  @@ -1233,6 +1243,12 @@
       ( cd suphp-%{V_suphp}
         %{l_shtool} install -c -s -m 711 \
             src/suphp $RPM_BUILD_ROOT%{l_prefix}/sbin/
  +      %{l_shtool} install -c -m 644 \
  +          -e 's;^\(logfile=\).*;\1%{l_prefix}/var/apache/log/suphp.log;' \
  +          -e 's;^\(webserver_user=\).*;\1%{with_suphp_caller};' \
  +          -e 's;/usr/bin/php;%{with_suphp_phpcgi};' \
  +          doc/suphp.conf-example \
  +          $RPM_BUILD_ROOT%{l_prefix}/etc/apache/suphp.conf
       ) || exit $?
   %endif
   
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to