]> granicus.if.org Git - apache/commitdiff
change ap_unix_create_privileged_process() to allocate enough space in
authorGreg Ames <gregames@apache.org>
Thu, 27 Dec 2001 19:53:37 +0000 (19:53 +0000)
committerGreg Ames <gregames@apache.org>
Thu, 27 Dec 2001 19:53:37 +0000 (19:53 +0000)
the newargs array to allow for a null terminator.  This allows suexec and
mod_cgid to work together reliably.

Apparently, rounding up the size to a multiple of 8 bytes in apr_palloc
hid the problem sometimes.  At other times, suexec would complain
about a null command name.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92627 13f79535-47bb-0310-9956-ffa450edef68

STATUS
os/unix/unixd.c

diff --git a/STATUS b/STATUS
index b0e9ea742c4ee89b40566d5c946670473dbcbf4d..75725ea6c69db4a4315312c0bf88e146542bf247 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                             -*-text-*-
-Last modified at [$Date: 2001/12/27 06:08:12 $]
+Last modified at [$Date: 2001/12/27 19:53:37 $]
 
 Release:
 
@@ -193,11 +193,6 @@ RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP:
       server-info or server-status.
         This proposed change would _not_ depricate Alias.
 
-    * daedalus: mod_cgid and suexec have a problem co-existing.  suexec 
-      sees a null command string sometimes.  The problem happens when
-      you access bugs.apache.org, then click on the "search the bug db"
-      button.
-
     * Win32: Rotatelogs sometimes is not terminated when Apache
       goes down hard.  FirstBill was looking at possibly tracking the 
       child's-child processes in the parent process.
index 673a1cfd9bb83f9e09e4872d431deb243a6b0c35..bdd760b9a9b827763684bbd6bff74011c76ebcc7 100644 (file)
@@ -345,7 +345,8 @@ static apr_status_t ap_unix_create_privileged_process(
             i++;
            }
     }
-    newargs = apr_palloc(p, sizeof(char *) * (i + 4));
+    /* allocate space for 4 new args, the input args, and a null terminator */
+    newargs = apr_palloc(p, sizeof(char *) * (i + 5));
     newprogname = SUEXEC_BIN;
     newargs[0] = SUEXEC_BIN;
     newargs[1] = execuser;