From: Randy Terbush Date: Tue, 14 Jan 1997 04:10:41 +0000 (+0000) Subject: *) Fix a problem introduced by the directory index patch that X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4b9c7cd3b9971b9a585382a6be676595dcec744;p=thirdparty%2Fapache%2Fhttpd.git *) Fix a problem introduced by the directory index patch that breaks CGI with PATH_INFO arguments. *) Remove const in storage type declaration for make_cookie(). Reviewed by: Marc Slemko, Sameer Parekh Submitted by: Marc Slemko CS: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3@77439 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/RELEASE_1_1_X/src/CHANGES b/RELEASE_1_1_X/src/CHANGES index a030d6be807..950e6392771 100644 --- a/RELEASE_1_1_X/src/CHANGES +++ b/RELEASE_1_1_X/src/CHANGES @@ -1,3 +1,10 @@ +Changes with Apache 1.1.3: + + *) Fix a problem introduced by the directory index patch that + breaks CGI with PATH_INFO arguments. + + *) Remove const in storage type declaration for make_cookie(). + Changes with Apache 1.1.2: *) Fix a buffer overflow problem in mod_cookies. Without these diff --git a/RELEASE_1_1_X/src/main/http_request.c b/RELEASE_1_1_X/src/main/http_request.c index 180c2651af0..d1509939319 100644 --- a/RELEASE_1_1_X/src/main/http_request.c +++ b/RELEASE_1_1_X/src/main/http_request.c @@ -179,10 +179,10 @@ int get_path_info(request_rec *r) *cp = '\0'; return OK; } -#if defined(ENOENT) - else if (errno == ENOENT) { +#if defined(ENOENT) && defined(ENOTDIR) + else if (errno == ENOENT || errno == ENOTDIR) { #else - #error Your system apparently does not define ENOENT. + #error Your system apparently does not define ENOENT || ENOTDIR. #error Removal of these lines opens a security hole if protecting #error from directory indexes with DirectoryIndex. else { @@ -195,9 +195,9 @@ int get_path_info(request_rec *r) while (cp > path && cp[-1] == '/') --cp; } -#if defined(ENOENT) +#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)", r->filename); + 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 FORBIDDEN; } #endif diff --git a/RELEASE_1_1_X/src/mod_cookies.c b/RELEASE_1_1_X/src/mod_cookies.c index 83612059908..5173beef5d6 100644 --- a/RELEASE_1_1_X/src/mod_cookies.c +++ b/RELEASE_1_1_X/src/mod_cookies.c @@ -121,7 +121,7 @@ void make_cookie(request_rec *r) struct timeval tv; char new_cookie[1024]; /* blurgh */ char *dot; - const char *rname = pstrdup(r->pool, + char *rname = pstrdup(r->pool, get_remote_host(r->connection, r->per_dir_config, REMOTE_NAME));