httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@hyperreal.com>
Subject cvs commit: apache/src http_request.c
Date Tue, 14 Jan 1997 05:03:09 GMT
randy       97/01/13 21:03:08

  Modified:    src       http_request.c
  Log:
  Complete fix for directoryindex problem.
  Reviewed by: Marc Slemko, Sameer, Parekh, Randy Terbush
  Submitted by: Marc Slemko
  
  Revision  Changes    Path
  1.37      +8 -8      apache/src/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -C3 -r1.36 -r1.37
  *** http_request.c	1997/01/12 20:01:21	1.36
  --- http_request.c	1997/01/14 05:03:06	1.37
  ***************
  *** 177,190 ****
    	    *cp = '\0';
    	    return OK;
    	}
  ! #if defined(ENOENT)
  ! 	else if (errno == ENOENT) {
    #else
  ! #error ENOENT not defined -- check the comment below this line in the source for details
    	/*
  ! 	 * If ENOENT is not defined in one of the your OS's include
  ! 	 * files, Apache does not know how to check to see why the
  ! 	 * stat() of the index file failed; there are cases where
    	 * it can fail even though the file exists.  This means
    	 * that it is possible for someone to get a directory
    	 * listing of a directory even though there is an index
  --- 177,190 ----
    	    *cp = '\0';
    	    return OK;
    	}
  ! #if defined(ENOENT) && defined(ENOTDIR)
  ! 	else if (errno == ENOENT || errno == ENOTDIR) {
    #else
  ! #error ENOENT || ENOTDIR not defined -- check the comment below this line in the source
for details
    	/*
  ! 	 * If ENOENT || ENOTDIR is not defined in one of the your OS's
  ! 	 * include files, Apache does not know how to check to see why
  ! 	 * the stat() of the index file failed; there are cases where
    	 * it can fail even though the file exists.  This means
    	 * that it is possible for someone to get a directory
    	 * listing of a directory even though there is an index
  ***************
  *** 206,214 ****
    	    while (cp > path && cp[-1] == '/')
    		--cp;
    	} 
  ! #if defined(ENOENT)
    	else {
  ! 	    log_reason("unable to determine if index file exists (stat() returned unexpected
error)", r->filename, r);
    	    return HTTP_FORBIDDEN;
    	}
    #endif
  --- 206,214 ----
    	    while (cp > path && cp[-1] == '/')
    		--cp;
    	} 
  ! #if defined(ENOENT) && defined(ENOTDIR)
    	else {
  ! 	    log_printf(r->server, "access to %s failed for client; unable to determine if
index file exists (stat() returned unexpected error[%d])", r->filename, errno);
    	    return HTTP_FORBIDDEN;
    	}
    #endif
  
  
  

Mime
View raw message