diff options
author | clement <clement@FreeBSD.org> | 2004-07-01 13:54:56 +0800 |
---|---|---|
committer | clement <clement@FreeBSD.org> | 2004-07-01 13:54:56 +0800 |
commit | 8cf698f8da788d0692f726e413588ba3f93831ac (patch) | |
tree | 0e2a4df507eb94eb218fe004e2d60027e69bf795 /www/apache20/files | |
parent | 5de2c610345a943c775f82849b9056805566e9d6 (diff) | |
download | freebsd-ports-gnome-8cf698f8da788d0692f726e413588ba3f93831ac.tar.gz freebsd-ports-gnome-8cf698f8da788d0692f726e413588ba3f93831ac.tar.zst freebsd-ports-gnome-8cf698f8da788d0692f726e413588ba3f93831ac.zip |
- Update to 2.0.50
Important changes:
*) SECURITY: CAN-2004-0493 (cve.mitre.org)
Close a denial of service vulnerability identified by Georgi
Guninski which could lead to memory exhaustion with certain
input data. [Jeff Trawick]
*) SECURITY: CAN-2004-0488 (cve.mitre.org)
mod_ssl: Fix a buffer overflow in the FakeBasicAuth code for a
(trusted) client certificate subject DN which exceeds 6K in length.
[Joe Orton]
Details can be found here:
http://www.apache.org/dist/httpd/CHANGES_2.0
- Use autoconf 2.59
- Add add SUEXEC_LOGFILE tunable to set suexec logfile [1]
- Silently ignore removal of libexec/apache2 directory
- Import latest version of apr_reslit.c from apr CVS which
adds timeout feature to apr_reslist_acquire().
This is required for future mod_logio-st.
- Add explicit dependency on libiconv (so nowwe support libiconv)
- Move Windows Update fix from MASTER_SITE_LOCAL to ports tree
- add WITH_EXPERIMENTAL_PATCHES knobs:
These patches are backports from apache CVS HEAD or apr CVS HEAD.
They have positive impacts on apache responsiveness but can be
instable
and are NOT currently supported by apache/apr teams.
* exp-http-ready.patch: add "httpready" support for ACCEPT_FILTER
(currently apache 2 only support "dataready")
* exp-apr-kqueue.patch: add support for kqueue in apr_poll().
This patch greatly improves apache network performance (up to
18% according to the author, on my test box, between 13% and 21%)
Test and feedback on -STABLE are welcome ;)
For more details, please see:
http://marc.theaimsgroup.com/?t=108650227500001&r=1&w=2
Submitted by: knu [1]
NOTE:
Please set MASTER_SITE_APACHE_HTTPD to closest mirrors.
you can easily find them from:
http://www.apache.org/dyn/closer.cgi/httpd/
Thanks :
Diffstat (limited to 'www/apache20/files')
-rw-r--r-- | www/apache20/files/exp-apr-kqueue.patch | 475 | ||||
-rw-r--r-- | www/apache20/files/exp-http-ready.patch | 21 | ||||
-rw-r--r-- | www/apache20/files/exp-windowsupdate.patch | 11 | ||||
-rw-r--r-- | www/apache20/files/patch-modules:ssl:ssl_engine_kernel.c | 39 | ||||
-rw-r--r-- | www/apache20/files/patch-server:protocol.c | 32 | ||||
-rw-r--r-- | www/apache20/files/patch-srclib:apr-util:misc:apr_reslist.c | 112 |
6 files changed, 619 insertions, 71 deletions
diff --git a/www/apache20/files/exp-apr-kqueue.patch b/www/apache20/files/exp-apr-kqueue.patch new file mode 100644 index 000000000000..be346ec25967 --- /dev/null +++ b/www/apache20/files/exp-apr-kqueue.patch @@ -0,0 +1,475 @@ +diff -Nursrclib/apr/configure.in srclib/apr/configure.in +--- srclib/apr/configure.in Thu May 27 21:12:47 2004 ++++ srclib/apr/configure.in Wed Jun 23 16:02:02 2004 +@@ -596,6 +596,25 @@ + + AC_CHECK_FUNCS(poll) + ++# Checks for the FreeBSD KQueue and Linux epoll interfaces: ++AC_CHECK_FUNC(kevent, ++ [AC_DEFINE([HAVE_KQUEUE], 1, [Define if the KQueue interface is supported])]) ++ ++# epoll* may be available in libc but return ENOSYS on a pre-2.6 kernel. ++AC_CACHE_CHECK([for epoll support], [apr_cv_epoll], ++[AC_TRY_RUN([ ++#include <sys/epoll.h> ++#include <unistd.h> ++ ++int main() ++{ ++ return epoll_create(5) == -1; ++}], [apr_cv_epoll=yes], [apr_cv_epoll=no], [apr_cv_epoll=no])]) ++ ++if test "$apr_cv_epoll" = "yes"; then ++ AC_DEFINE([HAVE_EPOLL], 1, [Define if the epoll interface is supported]) ++fi ++ + dnl ----------------------------- Checking for missing POSIX thread functions + AC_CHECK_FUNCS([getpwnam_r getpwuid_r getgrnam_r getgrgid_r]) + +diff -Nursrclib/apr/poll/unix/poll.c srclib/apr/poll/unix/poll.c +--- srclib/apr/poll/unix/poll.c Sat Apr 10 21:29:52 2004 ++++ srclib/apr/poll/unix/poll.c Wed Jun 23 16:05:58 2004 +@@ -29,11 +29,77 @@ + #include <alloca.h> + #endif + ++#ifdef HAVE_KQUEUE ++#include <sys/types.h> ++#include <sys/event.h> ++#include <sys/time.h> ++#endif ++ ++#ifdef HAVE_EPOLL ++#include <sys/epoll.h> ++#endif ++ + #ifdef NETWARE + #define HAS_SOCKETS(dt) (dt == APR_POLL_SOCKET) ? 1 : 0 + #define HAS_PIPES(dt) (dt == APR_POLL_FILE) ? 1 : 0 + #endif + ++#ifdef HAVE_KQUEUE ++static apr_int16_t get_kqueue_revent(apr_int16_t event, apr_int16_t flags) ++ { ++ apr_int16_t rv = 0; ++ ++ if (event & EVFILT_READ) ++ rv |= APR_POLLIN; ++ if (event & EVFILT_WRITE) ++ rv |= APR_POLLOUT; ++ if (flags & EV_ERROR || flags & EV_EOF) ++ rv |= APR_POLLERR; ++ ++ return rv; ++} ++#endif ++ ++#ifdef HAVE_EPOLL ++static apr_int16_t get_epoll_event(apr_int16_t event) ++{ ++ apr_int16_t rv = 0; ++ ++ if (event & APR_POLLIN) ++ rv |= EPOLLIN; ++ if (event & APR_POLLPRI) ++ rv |= EPOLLPRI; ++ if (event & APR_POLLOUT) ++ rv |= EPOLLOUT; ++ if (event & APR_POLLERR) ++ rv |= EPOLLERR; ++ if (event & APR_POLLHUP) ++ rv |= EPOLLHUP; ++ /* APR_POLLNVAL is not handled by epoll. */ ++ ++ return rv; ++} ++ ++static apr_int16_t get_epoll_revent(apr_int16_t event) ++{ ++ apr_int16_t rv = 0; ++ ++ if (event & EPOLLIN) ++ rv |= APR_POLLIN; ++ if (event & EPOLLPRI) ++ rv |= APR_POLLPRI; ++ if (event & EPOLLOUT) ++ rv |= APR_POLLOUT; ++ if (event & EPOLLERR) ++ rv |= APR_POLLERR; ++ if (event & EPOLLHUP) ++ rv |= APR_POLLHUP; ++ /* APR_POLLNVAL is not handled by epoll. */ ++ ++ return rv; ++} ++#endif ++ + #ifdef HAVE_POLL /* We can just use poll to do our socket polling. */ + + static apr_int16_t get_event(apr_int16_t event) +@@ -288,7 +354,14 @@ + struct apr_pollset_t { + apr_uint32_t nelts; + apr_uint32_t nalloc; +-#ifdef HAVE_POLL ++#ifdef HAVE_KQUEUE ++ int kqueue_fd; ++ struct kevent kevent; ++ struct kevent *ke_set; ++#elif defined(HAVE_EPOLL) ++ int epoll_fd; ++ struct epoll_event *pollset; ++#elif defined(HAVE_POLL) + struct pollfd *pollset; + #else + fd_set readset, writeset, exceptset; +@@ -302,12 +375,21 @@ + #endif + }; + ++#if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL) ++static apr_status_t backend_cleanup(void *p_) ++{ ++ apr_pollset_t *pollset = (apr_pollset_t *)p_; ++ return apr_pollset_destroy(pollset); ++ ++} ++#endif ++ + APR_DECLARE(apr_status_t) apr_pollset_create(apr_pollset_t **pollset, + apr_uint32_t size, + apr_pool_t *p, + apr_uint32_t flags) + { +-#if !defined(HAVE_POLL) && defined(FD_SETSIZE) ++#if !defined(HAVE_KQUEUE) && !defined(HAVE_EPOLL) && !defined(HAVE_POLL) && defined(FD_SETSIZE) + if (size > FD_SETSIZE) { + *pollset = NULL; + return APR_EINVAL; +@@ -316,7 +398,21 @@ + *pollset = apr_palloc(p, sizeof(**pollset)); + (*pollset)->nelts = 0; + (*pollset)->nalloc = size; +-#ifdef HAVE_POLL ++#ifdef HAVE_KQUEUE ++ (*pollset)->ke_set = (struct kevent*)apr_palloc(p, size * sizeof(struct kevent)); ++ memset((*pollset)->ke_set, 0, size * sizeof(struct kevent)); ++ (*pollset)->kqueue_fd = kqueue(); ++ if ((*pollset)->kqueue_fd == -1) { ++ return APR_ENOMEM; ++ } ++ apr_pool_cleanup_register(p, (void*)(*pollset), backend_cleanup, ++ apr_pool_cleanup_null); ++#elif defined(HAVE_EPOLL) ++ (*pollset)->epoll_fd = epoll_create(size); ++ (*pollset)->pollset = apr_palloc(p, size * sizeof(struct epoll_event)); ++ apr_pool_cleanup_register(p, (void*)(*pollset), backend_cleanup, ++ apr_pool_cleanup_null); ++#elif defined(HAVE_POLL) + (*pollset)->pollset = apr_palloc(p, size * sizeof(struct pollfd)); + #else + FD_ZERO(&((*pollset)->readset)); +@@ -335,25 +431,76 @@ + + APR_DECLARE(apr_status_t) apr_pollset_destroy(apr_pollset_t *pollset) + { +- /* A no-op function for now. If we later implement /dev/poll +- * support, we'll need to close the /dev/poll fd here +- */ ++#ifdef HAVE_KQUEUE ++ close(pollset->kqueue_fd); ++#elif defined(HAVE_EPOLL) ++ close(pollset->epoll_fd); ++#endif + return APR_SUCCESS; + } + + APR_DECLARE(apr_status_t) apr_pollset_add(apr_pollset_t *pollset, + const apr_pollfd_t *descriptor) + { +-#ifndef HAVE_POLL ++#ifdef HAVE_KQUEUE ++ apr_os_sock_t fd; ++#elif defined(HAVE_EPOLL) ++ struct epoll_event ev; ++ int ret = -1; ++#else ++#if !defined(HAVE_POLL) + apr_os_sock_t fd; + #endif ++#endif + + if (pollset->nelts == pollset->nalloc) { + return APR_ENOMEM; + } + + pollset->query_set[pollset->nelts] = *descriptor; +-#ifdef HAVE_POLL ++ ++#ifdef HAVE_KQUEUE ++ if (descriptor->desc_type == APR_POLL_SOCKET) { ++ fd = descriptor->desc.s->socketdes; ++ } ++ else { ++ fd = descriptor->desc.f->filedes; ++ } ++ ++ if (descriptor->reqevents & APR_POLLIN) { ++ EV_SET(&pollset->kevent, fd, EVFILT_READ, EV_ADD, 0, 0, NULL); ++ ++ if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, ++ NULL) == -1) { ++ return APR_ENOMEM; ++ } ++ } ++ ++ if (descriptor->reqevents & APR_POLLOUT) { ++ EV_SET(&pollset->kevent, fd, EVFILT_WRITE, EV_ADD, 0, 0, NULL); ++ ++ if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, ++ NULL) == -1) { ++ return APR_ENOMEM; ++ } ++ } ++ ++#elif defined(HAVE_EPOLL) ++ ev.events = get_epoll_event(descriptor->reqevents); ++ if (descriptor->desc_type == APR_POLL_SOCKET) { ++ ev.data.fd = descriptor->desc.s->socketdes; ++ ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_ADD, ++ descriptor->desc.s->socketdes, &ev); ++ } ++ else { ++ ev.data.fd = descriptor->desc.f->filedes; ++ ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_ADD, ++ descriptor->desc.f->filedes, &ev); ++ } ++ if (0 != ret) { ++ return APR_EBADF; ++ } ++#elif defined(HAVE_POLL) + + if (descriptor->desc_type == APR_POLL_SOCKET) { + pollset->pollset[pollset->nelts].fd = descriptor->desc.s->socketdes; +@@ -422,11 +569,97 @@ + const apr_pollfd_t *descriptor) + { + apr_uint32_t i; +-#ifndef HAVE_POLL ++#ifdef HAVE_KQUEUE ++ apr_os_sock_t fd; ++#elif defined(HAVE_EPOLL) ++ struct epoll_event ev; ++ int ret = -1; ++#elif defined(HAVE_POLL) + apr_os_sock_t fd; + #endif + +-#ifdef HAVE_POLL ++#ifdef HAVE_KQUEUE ++ for (i = 0; i < pollset->nelts; i++) { ++ if (descriptor->desc.s == pollset->query_set[i].desc.s) { ++ /* Found an instance of the fd: remove this and any other copies */ ++ apr_uint32_t dst = i; ++ apr_uint32_t old_nelts = pollset->nelts; ++ pollset->nelts--; ++ for (i++; i < old_nelts; i++) { ++ if (descriptor->desc.s == pollset->query_set[i].desc.s) { ++ pollset->nelts--; ++ } ++ else { ++ pollset->query_set[dst] = pollset->query_set[i]; ++ dst++; ++ } ++ } ++ ++ if (descriptor->desc_type == APR_POLL_SOCKET) { ++ fd = descriptor->desc.s->socketdes; ++ } ++ else { ++ fd = descriptor->desc.f->filedes; ++ } ++ ++ if (descriptor->reqevents & APR_POLLIN) { ++ EV_SET(&pollset->kevent, fd, ++ EVFILT_READ, EV_DELETE, 0, 0, NULL); ++ ++ if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, ++ NULL) == -1) { ++ return APR_EBADF; ++ } ++ } ++ ++ if (descriptor->reqevents & APR_POLLOUT) { ++ EV_SET(&pollset->kevent, fd, ++ EVFILT_WRITE, EV_DELETE, 0, 0, NULL); ++ ++ if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, ++ NULL) == -1) { ++ return APR_EBADF; ++ } ++ } ++ ++ return APR_SUCCESS; ++ } ++ } ++#elif defined(HAVE_EPOLL) ++ for (i = 0; i < pollset->nelts; i++) { ++ if (descriptor->desc.s == pollset->query_set[i].desc.s) { ++ /* Found an instance of the fd: remove this and any other copies */ ++ apr_uint32_t dst = i; ++ apr_uint32_t old_nelts = pollset->nelts; ++ pollset->nelts--; ++ for (i++; i < old_nelts; i++) { ++ if (descriptor->desc.s == pollset->query_set[i].desc.s) { ++ pollset->nelts--; ++ } ++ else { ++ pollset->query_set[dst] = pollset->query_set[i]; ++ dst++; ++ } ++ } ++ ev.events = get_epoll_event(descriptor->reqevents); ++ if (descriptor->desc_type == APR_POLL_SOCKET) { ++ ev.data.fd = descriptor->desc.s->socketdes; ++ ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_DEL, ++ descriptor->desc.s->socketdes, &ev); ++ } ++ else { ++ ev.data.fd = descriptor->desc.f->filedes; ++ ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_DEL, ++ descriptor->desc.f->filedes, &ev); ++ } ++ if (ret < 0) { ++ return APR_EBADF; ++ } ++ ++ return APR_SUCCESS; ++ } ++ } ++#elif defined(HAVE_POLL) + for (i = 0; i < pollset->nelts; i++) { + if (descriptor->desc.s == pollset->query_set[i].desc.s) { + /* Found an instance of the fd: remove this and any other copies */ +@@ -487,8 +720,119 @@ + + return APR_NOTFOUND; + } ++#ifdef HAVE_KQUEUE ++APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, ++ apr_interval_time_t timeout, ++ apr_int32_t *num, ++ const apr_pollfd_t **descriptors) ++{ ++ int rv; ++ apr_uint32_t i, j, r = 0; ++ struct timespec tv, *tvptr; ++ ++ if (timeout < 0) { ++ tvptr = NULL; ++ } ++ else { ++ tv.tv_sec = (long)apr_time_sec(timeout); ++ tv.tv_nsec = (long)apr_time_msec(timeout); ++ tvptr = &tv; ++ } + +-#ifdef HAVE_POLL ++ rv = kevent(pollset->kqueue_fd, NULL, 0, pollset->ke_set, pollset->nelts, ++ tvptr); ++ (*num) = rv; ++ if (rv < 0) { ++ return apr_get_netos_error(); ++ } ++ if (rv == 0) { ++ return APR_TIMEUP; ++ } ++ ++ /* TODO: Is there a better way to re-associate our data? */ ++ for (i = 0; i < pollset->nelts; i++) { ++ apr_os_sock_t fd; ++ if (pollset->query_set[i].desc_type == APR_POLL_SOCKET) { ++ fd = pollset->query_set[i].desc.s->socketdes; ++ } ++ else { ++ fd = pollset->query_set[i].desc.f->filedes; ++ } ++ for (j = 0; j < rv; j++) { ++ if (pollset->ke_set[j].ident == fd ) { ++ pollset->result_set[r] = pollset->query_set[i]; ++ pollset->result_set[r].rtnevents = ++ get_kqueue_revent(pollset->ke_set[j].filter, ++ pollset->ke_set[j].flags); ++ r++; ++ } ++ } ++ } ++ ++ (*num) = r; ++ ++ if (descriptors) { ++ *descriptors = pollset->result_set; ++ } ++ ++ return APR_SUCCESS; ++} ++ ++#elif defined(HAVE_EPOLL) ++ ++APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, ++ apr_interval_time_t timeout, ++ apr_int32_t *num, ++ const apr_pollfd_t **descriptors) ++{ ++ int rv; ++ apr_uint32_t i, j, k; ++ ++ if (timeout > 0) { ++ timeout /= 1000; ++ } ++ ++ rv = epoll_wait(pollset->epoll_fd, pollset->pollset, pollset->nelts, ++ timeout); ++ (*num) = rv; ++ if (rv < 0) { ++ return apr_get_netos_error(); ++ } ++ if (rv == 0) { ++ return APR_TIMEUP; ++ } ++ j = 0; ++ for (i = 0; i < pollset->nelts; i++) { ++ if (pollset->pollset[i].events != 0) { ++ /* TODO: Is there a better way to re-associate our data? */ ++ for (k = 0; k < pollset->nelts; k++) { ++ if (pollset->query_set[k].desc_type == APR_POLL_SOCKET && ++ pollset->query_set[k].desc.s->socketdes == ++ pollset->pollset[i].data.fd) { ++ pollset->result_set[j] = pollset->query_set[k]; ++ pollset->result_set[j].rtnevents = ++ get_epoll_revent(pollset->pollset[i].events); ++ j++; ++ break; ++ } ++ else if (pollset->query_set[k].desc_type == APR_POLL_FILE ++ && pollset->query_set[k].desc.f->filedes == ++ pollset->pollset[i].data.fd) { ++ pollset->result_set[j] = pollset->query_set[k]; ++ pollset->result_set[j].rtnevents = ++ get_epoll_revent(pollset->pollset[i].events); ++ j++; ++ break; ++ } ++ } ++ } ++ } ++ if (descriptors) { ++ *descriptors = pollset->result_set; ++ } ++ return APR_SUCCESS; ++} ++#elif defined(HAVE_POLL) + APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, + apr_interval_time_t timeout, + apr_int32_t *num, diff --git a/www/apache20/files/exp-http-ready.patch b/www/apache20/files/exp-http-ready.patch new file mode 100644 index 000000000000..6ee0663cd540 --- /dev/null +++ b/www/apache20/files/exp-http-ready.patch @@ -0,0 +1,21 @@ +Index: server/listen.c +=================================================================== +RCS file: /home/cvspublic/httpd-2.0/server/listen.c,v +retrieving revision 1.95 +diff -u -r1.95 listen.c +--- server/listen.c 1 Jan 2004 13:26:23 -0000 1.95 ++++ server/listen.c 3 Feb 2004 17:34:08 -0000 +@@ -199,7 +199,13 @@ + + #if APR_HAS_SO_ACCEPTFILTER + #ifndef ACCEPT_FILTER_NAME ++#define ACCEPT_FILTER_NAME "httpready" ++#ifdef __FreeBSD_version ++#if __FreeBSD_version < 411000 /* httpready broken before 4.1.1 */ ++#undef ACCEPT_FILTER_NAME + #define ACCEPT_FILTER_NAME "dataready" ++#endif ++#endif + #endif + apr_socket_accept_filter(s, ACCEPT_FILTER_NAME, ""); + #endif diff --git a/www/apache20/files/exp-windowsupdate.patch b/www/apache20/files/exp-windowsupdate.patch new file mode 100644 index 000000000000..3f1306777100 --- /dev/null +++ b/www/apache20/files/exp-windowsupdate.patch @@ -0,0 +1,11 @@ +--- server/protocol.c.orig Tue Jun 29 08:21:28 2004 ++++ server/protocol.c Tue Jun 29 08:21:50 2004 +@@ -1248,7 +1248,7 @@ + * We can only set a C-L in the response header if we haven't already + * sent any buckets on to the next output filter for this request. + */ +- if (ctx->data_sent == 0 && eos) { ++ if (ctx->data_sent == 0 && eos && !r->header_only) { + ap_set_content_length(r, r->bytes_sent); + } + diff --git a/www/apache20/files/patch-modules:ssl:ssl_engine_kernel.c b/www/apache20/files/patch-modules:ssl:ssl_engine_kernel.c deleted file mode 100644 index 571d465c4767..000000000000 --- a/www/apache20/files/patch-modules:ssl:ssl_engine_kernel.c +++ /dev/null @@ -1,39 +0,0 @@ -=================================================================== -RCS file: /home/cvspublic/modules/ssl/ssl_engine_kernel.c,v -retrieving revision 1.105 -retrieving revision 1.106 -diff -u -r1.105 -r1.106 ---- modules/ssl/ssl_engine_kernel.c 2004/03/05 02:44:40 1.105 -+++ modules/ssl/ssl_engine_kernel.c 2004/05/25 12:09:01 1.106 -@@ -807,7 +807,6 @@ - SSLConnRec *sslconn = myConnConfig(r->connection); - SSLSrvConfigRec *sc = mySrvConfig(r->server); - SSLDirConfigRec *dc = myDirConfig(r); -- char buf1[MAX_STRING_LEN], buf2[MAX_STRING_LEN]; - char *clientdn; - const char *auth_line, *username, *password; - -@@ -886,14 +885,16 @@ - * adding the string "xxj31ZMTZzkVA" as the password in the user file. - * This is just the crypted variant of the word "password" ;-) - */ -- apr_snprintf(buf1, sizeof(buf1), "%s:password", clientdn); -- ssl_util_uuencode(buf2, buf1, FALSE); -- -- apr_snprintf(buf1, sizeof(buf1), "Basic %s", buf2); -- apr_table_set(r->headers_in, "Authorization", buf1); -+ auth_line = apr_pstrcat(r->pool, "Basic ", -+ ap_pbase64encode(r->pool, -+ apr_pstrcat(r->pool, clientdn, -+ ":password", NULL)), -+ NULL); -+ apr_table_set(r->headers_in, "Authorization", auth_line); - - ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server, -- "Faking HTTP Basic Auth header: \"Authorization: %s\"", buf1); -+ "Faking HTTP Basic Auth header: \"Authorization: %s\"", -+ auth_line); - - return DECLINED; - } - diff --git a/www/apache20/files/patch-server:protocol.c b/www/apache20/files/patch-server:protocol.c deleted file mode 100644 index 96cd559e63d8..000000000000 --- a/www/apache20/files/patch-server:protocol.c +++ /dev/null @@ -1,32 +0,0 @@ -=================================================================== -RCS file: /home/cvspublic/httpd-2.0/server/protocol.c,v -retrieving revision 1.121.2.18 -retrieving revision 1.121.2.19 -diff -u -r1.121.2.18 -r1.121.2.19 ---- server/protocol.c 2004/06/11 20:46:41 1.121.2.18 -+++ server/protocol.c 2004/06/28 23:57:14 1.121.2.19 -@@ -719,6 +719,23 @@ - * continuations that span many many lines. - */ - apr_size_t fold_len = last_len + len + 1; /* trailing null */ -+ -+ if ((fold_len - 1) > r->server->limit_req_fieldsize) { -+ r->status = HTTP_BAD_REQUEST; -+ /* report what we have accumulated so far before the -+ * overflow (last_field) as the field with the problem -+ */ -+ apr_table_setn(r->notes, "error-notes", -+ apr_pstrcat(r->pool, -+ "Size of a request header field " -+ "after folding " -+ "exceeds server limit.<br />\n" -+ "<pre>\n", -+ ap_escape_html(r->pool, last_field), -+ "</pre>\n", NULL)); -+ return; -+ } -+ - if (fold_len > alloc_len) { - char *fold_buf; - alloc_len += alloc_len; - diff --git a/www/apache20/files/patch-srclib:apr-util:misc:apr_reslist.c b/www/apache20/files/patch-srclib:apr-util:misc:apr_reslist.c new file mode 100644 index 000000000000..d6a9fdbf709f --- /dev/null +++ b/www/apache20/files/patch-srclib:apr-util:misc:apr_reslist.c @@ -0,0 +1,112 @@ +--- srclib/apr-util/misc/apr_reslist.c.orig Fri Feb 13 04:52:43 2004 ++++ srclib/apr-util/misc/apr_reslist.c Mon Mar 15 08:21:26 2004 +@@ -49,6 +49,7 @@ + int smax; /* soft maximum on the total number of resources */ + int hmax; /* hard maximum on the total number of resources */ + apr_interval_time_t ttl; /* TTL when we have too many resources */ ++ apr_interval_time_t timeout; /* Timeout for waiting on resource */ + apr_reslist_constructor constructor; + apr_reslist_destructor destructor; + void *params; /* opaque data passed to constructor and destructor calls */ +@@ -118,12 +119,9 @@ + res = apr_pcalloc(reslist->pool, sizeof(*res)); + + rv = reslist->constructor(&res->opaque, reslist->params, reslist->pool); +- if (rv != APR_SUCCESS) { +- return rv; +- } + + *ret_res = res; +- return APR_SUCCESS; ++ return rv; + } + + /** +@@ -132,14 +130,7 @@ + */ + static apr_status_t destroy_resource(apr_reslist_t *reslist, apr_res_t *res) + { +- apr_status_t rv; +- +- rv = reslist->destructor(res->opaque, reslist->params, reslist->pool); +- if (rv != APR_SUCCESS) { +- return rv; +- } +- +- return APR_SUCCESS; ++ return reslist->destructor(res->opaque, reslist->params, reslist->pool); + } + + static apr_status_t reslist_cleanup(void *data_) +@@ -187,6 +178,7 @@ + /* Create the resource */ + rv = create_resource(reslist, &res); + if (rv != APR_SUCCESS) { ++ free_container(reslist, res); + apr_thread_mutex_unlock(reslist->listlock); + return rv; + } +@@ -313,7 +305,15 @@ + * a new one, or something becomes free. */ + else while (reslist->ntotal >= reslist->hmax + && reslist->nidle <= 0) { +- apr_thread_cond_wait(reslist->avail, reslist->listlock); ++ if (reslist->timeout) { ++ if ((rv = apr_thread_cond_timedwait(reslist->avail, ++ reslist->listlock, reslist->timeout)) != APR_SUCCESS) { ++ apr_thread_mutex_unlock(reslist->listlock); ++ return rv; ++ } ++ } ++ else ++ apr_thread_cond_wait(reslist->avail, reslist->listlock); + } + /* If we popped out of the loop, first try to see if there + * are new resources available for immediate use. */ +@@ -329,17 +329,13 @@ + * a resource to fill the slot and use it. */ + else { + rv = create_resource(reslist, &res); +- +- if (rv != APR_SUCCESS) { +- apr_thread_mutex_unlock(reslist->listlock); +- return rv; ++ if (rv == APR_SUCCESS) { ++ reslist->ntotal++; ++ *resource = res->opaque; + } +- +- reslist->ntotal++; +- *resource = res->opaque; + free_container(reslist, res); + apr_thread_mutex_unlock(reslist->listlock); +- return APR_SUCCESS; ++ return rv; + } + } + +@@ -356,6 +352,23 @@ + apr_thread_mutex_unlock(reslist->listlock); + + return reslist_maint(reslist); ++} ++ ++APU_DECLARE(void) apr_reslist_timeout_set(apr_reslist_t *reslist, ++ apr_interval_time_t timeout) ++{ ++ reslist->timeout = timeout; ++} ++ ++APU_DECLARE(apr_status_t) apr_reslist_invalidate(apr_reslist_t *reslist, ++ void *resource) ++{ ++ apr_status_t ret; ++ apr_thread_mutex_lock(reslist->listlock); ++ ret = reslist->destructor(resource, reslist->params, reslist->pool); ++ reslist->ntotal--; ++ apr_thread_mutex_unlock(reslist->listlock); ++ return ret; + } + + #endif /* APR_HAS_THREADS */ + |