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

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   16-Dec-2004 21:31:27
  Branch: OPENPKG_2_1_SOLID                Handle: 2004121620312700

  Modified files:           (Branch: OPENPKG_2_1_SOLID)
    openpkg-src/apache      apache.patch.php apache.spec

  Log:
    Shit happens: one hunk too much, others missing plus a whole file not
    patched

  Summary:
    Revision    Changes     Path
    1.2.4.3     +151 -14    openpkg-src/apache/apache.patch.php
    1.241.2.12  +1  -1      openpkg-src/apache/apache.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/apache/apache.patch.php
  ============================================================================
  $ cvs diff -u -r1.2.4.2 -r1.2.4.3 apache.patch.php
  --- openpkg-src/apache/apache.patch.php       16 Dec 2004 17:02:17 -0000      
1.2.4.2
  +++ openpkg-src/apache/apache.patch.php       16 Dec 2004 20:31:27 -0000      
1.2.4.3
  @@ -85,7 +85,7 @@
   
   o CAN-2004-1063:
     safe_mode execution directory bypass.
  -  (ext/standard/link.c)
  +  (ext/standard/link.c, TSRM/tsrm_virtual_cwd.c)
   
   o CAN-2004-1064:
     arbitrary file access through path truncation.
  @@ -243,7 +243,7 @@
                                break;
   Index: ext/standard/var_unserializer.re
   --- ext/standard/var_unserializer.re.orig    2004-03-27 02:17:06 +0100
  -+++ ext/standard/var_unserializer.re 2004-12-16 17:20:05 +0100
  ++++ ext/standard/var_unserializer.re 2004-12-16 21:09:57 +0100
   @@ -62,7 +62,7 @@
    
        if (!var_hash) return !SUCCESS;
  @@ -278,18 +278,35 @@
                                zend_hash_update(ht, Z_STRVAL_P(key), 
Z_STRLEN_P(key) + 1, &data, sizeof(data), NULL);
                                break;
    
  -@@ -311,6 +317,8 @@
  -     } else {
  -             str = estrndup(YYCURSOR, len);
  +@@ -398,7 +404,6 @@
  + #ifdef ZEND_ENGINE_2
  +                                     ce = *(zend_class_entry **)ce; /* Bad 
hack, TBF! */
  + #endif      
  +-                                    efree(class_name);
  +                             }
  +                     }
  +             }
  +@@ -406,7 +411,6 @@
  + #ifdef ZEND_ENGINE_2
  +             ce = *(zend_class_entry **)ce; /* Bad hack, TBF! */
  + #endif      
  +-            efree(class_name);
        }
  -+    
  -+    if (*rval == *rval_ref) return 0;
    
  -     YYCURSOR += len + 2;
        *p = YYCURSOR;
  +@@ -414,8 +418,8 @@
  + 
  +     if (incomplete_class) {
  +             php_store_class_name(*rval, class_name, len2 TSRMLS_CC);
  +-            efree(class_name);
  +     }
  ++    efree(class_name);
  + 
  +     return object_common2(UNSERIALIZE_PASSTHRU, elements);
  + }
   Index: ext/standard/var_unserializer.c
   --- ext/standard/var_unserializer.c.orig     2004-07-13 16:53:12 +0200
  -+++ ext/standard/var_unserializer.c  2004-12-16 17:20:05 +0100
  ++++ ext/standard/var_unserializer.c  2004-12-16 21:10:16 +0100
   @@ -63,7 +63,7 @@
    
        if (!var_hash) return !SUCCESS;
  @@ -324,15 +341,32 @@
                                zend_hash_update(ht, Z_STRVAL_P(key), 
Z_STRLEN_P(key) + 1, &data, sizeof(data), NULL);
                                break;
    
  -@@ -566,6 +572,8 @@
  -             str = estrndup(YYCURSOR, len);
  +@@ -435,7 +441,6 @@
  + #ifdef ZEND_ENGINE_2
  +                                     ce = *(zend_class_entry **)ce; /* Bad 
hack, TBF! */
  + #endif      
  +-                                    efree(class_name);
  +                             }
  +                     }
  +             }
  +@@ -443,7 +448,6 @@
  + #ifdef ZEND_ENGINE_2
  +             ce = *(zend_class_entry **)ce; /* Bad hack, TBF! */
  + #endif      
  +-            efree(class_name);
        }
    
  -+    if (*rval == *rval_ref) return 0;
  -+
  -     YYCURSOR += len + 2;
        *p = YYCURSOR;
  +@@ -451,8 +455,8 @@
  + 
  +     if (incomplete_class) {
  +             php_store_class_name(*rval, class_name, len2 TSRMLS_CC);
  +-            efree(class_name);
  +     }
  ++    efree(class_name);
    
  +     return object_common2(UNSERIALIZE_PASSTHRU, elements);
  + }
   Index: main/php.h
   --- main/php.h.orig  2003-09-25 01:22:32 +0200
   +++ main/php.h       2004-12-16 17:20:05 +0100
  @@ -460,3 +494,106 @@
                        if (s && s > filename) {
                                safe_php_register_variable(lbuf, s+1, NULL, 0 
TSRMLS_CC);
                        } else {
  +Index: TSRM/tsrm_virtual_cwd.c
  +--- TSRM/tsrm_virtual_cwd.c.orig     2003-07-28 20:35:34 +0200
  ++++ TSRM/tsrm_virtual_cwd.c  2004-12-16 21:15:08 +0100
  +@@ -301,15 +301,22 @@
  + 
  +     if (path_length == 0) 
  +             return (0);
  ++    if (path_length >= MAXPATHLEN)
  ++            return (1);
  + 
  + #if !defined(TSRM_WIN32) && !defined(NETWARE)
  +     /* cwd_length can be 0 when getcwd() fails.
  +      * This can happen under solaris when a dir does not have read 
permissions
  +      * but *does* have execute permissions */
  +     if (IS_ABSOLUTE_PATH(path, path_length) || (state->cwd_length < 1)) {
  +-            if (use_realpath && realpath(path, resolved_path)) {
  +-                    path = resolved_path;
  +-                    path_length = strlen(path);
  ++            if (use_realpath) {
  ++                    if (realpath(path, resolved_path)) {
  ++                            path = resolved_path;
  ++                            path_length = strlen(path);
  ++                    } else {
  ++                            /* disable for now
  ++                            return 1; */
  ++                    }
  +             }
  +     } else { /* Concat current directory with relative path and then run 
realpath() on it */
  +             char *tmp;
  +@@ -325,9 +332,19 @@
  +             memcpy(ptr, path, path_length);
  +             ptr += path_length;
  +             *ptr = '\0';
  +-            if (use_realpath && realpath(tmp, resolved_path)) {
  +-                    path = resolved_path;
  +-                    path_length = strlen(path);
  ++            if (strlen(tmp) >= MAXPATHLEN) {
  ++                    free(tmp);
  ++                    return 1;
  ++            }
  ++            if (use_realpath) {
  ++                    if (realpath(tmp, resolved_path)) {
  ++                            path = resolved_path;
  ++                            path_length = strlen(path);
  ++                    } else {
  ++                            /* disable for now
  ++                            free(tmp);
  ++                            return 1; */
  ++                    }
  +             }
  +             free(tmp);
  +     }
  +@@ -818,13 +835,24 @@
  + CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
  + {
  +     int command_length;
  ++    int dir_length, extra = 0;
  +     char *command_line;
  +-    char *ptr;
  ++    char *ptr, *dir;
  +     FILE *retval;
  + 
  +     command_length = strlen(command);
  + 
  +-    ptr = command_line = (char *) malloc(command_length + sizeof("cd  ; ") 
+ CWDG(cwd).cwd_length+1);
  ++    dir_length = CWDG(cwd).cwd_length;
  ++    dir = CWDG(cwd).cwd;
  ++    while (dir_length > 0) {
  ++            if (*dir == '\'') extra+=3;
  ++            dir++;
  ++            dir_length--;
  ++    }
  ++    dir_length = CWDG(cwd).cwd_length;
  ++    dir = CWDG(cwd).cwd;
  ++
  ++    ptr = command_line = (char *) malloc(command_length + sizeof("cd '' ; 
") + dir_length +1+1);
  +     if (!command_line) {
  +             return NULL;
  +     }
  +@@ -834,8 +862,21 @@
  +     if (CWDG(cwd).cwd_length == 0) {
  +             *ptr++ = DEFAULT_SLASH;
  +     } else {
  +-            memcpy(ptr, CWDG(cwd).cwd, CWDG(cwd).cwd_length);
  +-            ptr += CWDG(cwd).cwd_length;
  ++            *ptr++ = '\'';
  ++            while (dir_length > 0) {
  ++                    switch (*dir) {
  ++                    case '\'':
  ++                            *ptr++ = '\'';
  ++                            *ptr++ = '\\';
  ++                            *ptr++ = '\'';
  ++                            /* fall-through */
  ++                    default:
  ++                            *ptr++ = *dir;
  ++                    }
  ++                    dir++;
  ++                    dir_length--;
  ++            }
  ++            *ptr++ = '\'';
  +     }
  +     
  +     *ptr++ = ' ';
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/apache/apache.spec
  ============================================================================
  $ cvs diff -u -r1.241.2.11 -r1.241.2.12 apache.spec
  --- openpkg-src/apache/apache.spec    16 Dec 2004 17:02:17 -0000      
1.241.2.11
  +++ openpkg-src/apache/apache.spec    16 Dec 2004 20:31:27 -0000      
1.241.2.12
  @@ -66,7 +66,7 @@
   Group:        Web
   License:      ASF
   Version:      %{V_apache}
  -Release:      2.1.7
  +Release:      2.1.8
   
   #   package options (suexec related)
   %option       with_suexec               yes
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to