Received: by taz.hyperreal.com (8.8.3/V2.0) id VAA25835; Mon, 13 Jan 1997 21:03:14 -0800 (PST) Received: by taz.hyperreal.com (8.8.3/V2.0) id VAA25827; Mon, 13 Jan 1997 21:03:09 -0800 (PST) Date: Mon, 13 Jan 1997 21:03:09 -0800 (PST) From: Randy Terbush Message-Id: <199701140503.VAA25827@taz.hyperreal.com> To: apache-cvs@hyperreal.com Subject: cvs commit: apache/src http_request.c Sender: apache-cvs-owner@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com 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