httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: httpd-2.0/modules/filters mod_include.c
Date Sun, 26 May 2002 08:27:11 GMT
brianp      02/05/26 01:27:11

  Modified:    .        CHANGES
               os/unix  unixd.c
               modules/filters mod_include.c
  Log:
  Fix for suexec execution of CGI scripts from mod_include
  (including security patch to ensure that <!--#include file="name.cgi"-->
  is run as the suexec user rather than the httpd user)
  PR: 7791, 8291
  Submitted by: Colm MacCarthaigh <colmmacc@redbrick.dcu.ie>
  Reviewed by:	Brian Pane
  
  Revision  Changes    Path
  1.788     +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.787
  retrieving revision 1.788
  diff -u -r1.787 -r1.788
  --- CHANGES	25 May 2002 20:10:55 -0000	1.787
  +++ CHANGES	26 May 2002 08:27:10 -0000	1.788
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0.37
   
  +  *) Fix suexec execution of CGI scripts from mod_include.
  +     PR 7791, 8291  [Colm MacCarthaigh <colmmacc@redbrick.dcu.ie>]
  +
     *) Fix segfaults at startup on some platforms when mod_auth_digest,
        mod_suexec, or mod_ssl were used as DSO's due to the way they
        were tracking the current init phase since DSO's get completely
  
  
  
  1.53      +12 -3     httpd-2.0/os/unix/unixd.c
  
  Index: unixd.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/os/unix/unixd.c,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- unixd.c	17 May 2002 11:33:10 -0000	1.52
  +++ unixd.c	26 May 2002 08:27:10 -0000	1.53
  @@ -350,16 +350,25 @@
   	    }
       }
       /* allocate space for 4 new args, the input args, and a null terminator */
  -    newargs = apr_palloc(p, sizeof(char *) * (i + 5));
  +    newargs = apr_palloc(p, sizeof(char *) * (i + 4));
       newprogname = SUEXEC_BIN;
       newargs[0] = SUEXEC_BIN;
       newargs[1] = execuser;
       newargs[2] = execgroup;
       newargs[3] = apr_pstrdup(p, progname);
   
  -    i = 0;
  +    /*
  +    ** using a shell to execute suexec makes no sense thus
  +    ** we force everything to be APR_PROGRAM, and never
  +    ** APR_SHELLCMD
  +    */
  +    if(apr_procattr_cmdtype_set(attr, APR_PROGRAM) != APR_SUCCESS) {
  +        return APR_EGENERAL;
  +    }
  +
  +    i = 1;
       do {
  -        newargs[i + 4] = args[i];
  +        newargs[i + 3] = args[i];
       } while (args[i++]);
   
       return apr_proc_create(newproc, newprogname, newargs, env, attr, p);
  
  
  
  1.224     +1 -1      httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.223
  retrieving revision 1.224
  diff -u -r1.223 -r1.224
  --- mod_include.c	25 May 2002 04:06:34 -0000	1.223
  +++ mod_include.c	26 May 2002 08:27:10 -0000	1.224
  @@ -1263,7 +1263,7 @@
                                       "in parsed file %s";
                       }
                       else {
  -                        rr = ap_sub_req_lookup_file(parsed_string, r, f->next);
  +                        rr = ap_sub_req_lookup_uri(parsed_string, r, f->next);
                       }
                   }
                   else {
  
  
  

Mime
View raw message