httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/server util.c
Date Fri, 24 Aug 2001 01:41:56 GMT
wrowe       01/08/23 18:41:56

  Modified:    server   util.c
  Log:
    Revert this patch.  It indicates some fundamental brokenness with the
    apr_filepath_root() fn, which should simply return '/' for an absolute
    path on (most) unix, and advance the path pointer to the first non-'/'
    character  [if only Win32 and others were so simple ;-]
  
  Revision  Changes    Path
  1.112     +2 -7      httpd-2.0/server/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/util.c,v
  retrieving revision 1.111
  retrieving revision 1.112
  diff -u -r1.111 -r1.112
  --- util.c	2001/08/24 01:26:31	1.111
  +++ util.c	2001/08/24 01:41:56	1.112
  @@ -259,13 +259,8 @@
   {
       const char *newpath;
       const char *ourdir = dir;
  -    apr_status_t rv = apr_filepath_root(&newpath, &dir, 0, p);
  -
  -    if (rv == APR_EABSOLUTE) {
  -        return 1;
  -    }
  -
  -    if (rv != APR_SUCCESS || strncmp(newpath, ourdir, strlen(newpath)) != 0) {
  +    if (apr_filepath_root(&newpath, &dir, 0, p) != APR_SUCCESS
  +            || strncmp(newpath, ourdir, strlen(newpath)) != 0) {
           return 0;
       }
       return 1;
  
  
  

Mime
View raw message