summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavoz@gentoo.org>2007-07-20 13:46:14 +0000
committerGustavo Zacarias <gustavoz@gentoo.org>2007-07-20 13:46:14 +0000
commitdd04898042835cd366c471cd047055b9a52028b7 (patch)
tree461ec3d63a42318258beec47ba540339f1574d06 /www-servers
parentVersion bump. (diff)
downloadhistorical-dd04898042835cd366c471cd047055b9a52028b7.tar.gz
historical-dd04898042835cd366c471cd047055b9a52028b7.tar.bz2
historical-dd04898042835cd366c471cd047055b9a52028b7.zip
Revbump with security fixes #185442
Package-Manager: portage-2.1.2.9
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/lighttpd/ChangeLog12
-rw-r--r--www-servers/lighttpd/Manifest39
-rw-r--r--www-servers/lighttpd/files/1.4.15/07_all_lighttpd-1.4.15-duplicated_headers_with_folding_crash.diff122
-rw-r--r--www-servers/lighttpd/files/1.4.15/08_all_lighttpd-1.4.15-mod_acces_bypass.diff129
-rw-r--r--www-servers/lighttpd/files/1.4.15/09_all_lighttpd-1.4.15-mod_fastcgi_local_dos.diff12
-rw-r--r--www-servers/lighttpd/files/1.4.15/10_all_lighttpd-1.4.15-mod_scgi_crash.diff12
-rw-r--r--www-servers/lighttpd/files/digest-lighttpd-1.4.15-r13
-rw-r--r--www-servers/lighttpd/lighttpd-1.4.15-r1.ebuild210
8 files changed, 530 insertions, 9 deletions
diff --git a/www-servers/lighttpd/ChangeLog b/www-servers/lighttpd/ChangeLog
index 8b90732f38b4..2a9d888aab3b 100644
--- a/www-servers/lighttpd/ChangeLog
+++ b/www-servers/lighttpd/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for www-servers/lighttpd
# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/ChangeLog,v 1.122 2007/07/15 09:08:40 phreak Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/ChangeLog,v 1.123 2007/07/20 13:46:14 gustavoz Exp $
+
+*lighttpd-1.4.15-r1 (20 Jul 2007)
+
+ 20 Jul 2007; Gustavo Zacarias <gustavoz@gentoo.org>
+ +files/1.4.15/07_all_lighttpd-1.4.15-duplicated_headers_with_folding_crash
+ .diff, +files/1.4.15/08_all_lighttpd-1.4.15-mod_acces_bypass.diff,
+ +files/1.4.15/09_all_lighttpd-1.4.15-mod_fastcgi_local_dos.diff,
+ +files/1.4.15/10_all_lighttpd-1.4.15-mod_scgi_crash.diff,
+ +lighttpd-1.4.15-r1.ebuild:
+ Revbump with security fixes #185442
15 Jul 2007; Christian Heim <phreak@gentoo.org> metadata.xml:
Assigning to www-servers, as beu is being retired (#66608).
diff --git a/www-servers/lighttpd/Manifest b/www-servers/lighttpd/Manifest
index d69d26b3e0f8..7f5d51c7b55a 100644
--- a/www-servers/lighttpd/Manifest
+++ b/www-servers/lighttpd/Manifest
@@ -49,6 +49,22 @@ AUX 1.4.15/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff 502 RMD160 a10372a6cd
MD5 87cf789e1f6866b9ece50a4af418b5b8 files/1.4.15/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff 502
RMD160 a10372a6cdfce349c6221f5038f2fda699f5f74e files/1.4.15/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff 502
SHA256 0a7f3626e23291b3859e953bcc1762117a1585c2717adc065ccbb0ccf2f3577a files/1.4.15/04_all_lighttpd-1.4.13-deprecated-ldap-api.diff 502
+AUX 1.4.15/07_all_lighttpd-1.4.15-duplicated_headers_with_folding_crash.diff 3166 RMD160 98110f2a772f0b7bd601dd9bbf1741166730d9e1 SHA1 a52de9fcc0b1605d176984e7a4b778ea5d4a13fe SHA256 d7526ac5605a5c23a39c837967551d3f433f0e70e70b03193fa463693234fb63
+MD5 9295078a5c43574707da9d45a2594fd3 files/1.4.15/07_all_lighttpd-1.4.15-duplicated_headers_with_folding_crash.diff 3166
+RMD160 98110f2a772f0b7bd601dd9bbf1741166730d9e1 files/1.4.15/07_all_lighttpd-1.4.15-duplicated_headers_with_folding_crash.diff 3166
+SHA256 d7526ac5605a5c23a39c837967551d3f433f0e70e70b03193fa463693234fb63 files/1.4.15/07_all_lighttpd-1.4.15-duplicated_headers_with_folding_crash.diff 3166
+AUX 1.4.15/08_all_lighttpd-1.4.15-mod_acces_bypass.diff 3775 RMD160 25dc83e84d1c8d4c63d0e580c3b1336531fb592d SHA1 964cb4b80dab8c52ddf33aa246355bb5136a3f31 SHA256 31b2903c8302b55264e32c15afd9496379909469225e1982a3fc555d713ca785
+MD5 2df0144efa29fcb308dce1262794cd02 files/1.4.15/08_all_lighttpd-1.4.15-mod_acces_bypass.diff 3775
+RMD160 25dc83e84d1c8d4c63d0e580c3b1336531fb592d files/1.4.15/08_all_lighttpd-1.4.15-mod_acces_bypass.diff 3775
+SHA256 31b2903c8302b55264e32c15afd9496379909469225e1982a3fc555d713ca785 files/1.4.15/08_all_lighttpd-1.4.15-mod_acces_bypass.diff 3775
+AUX 1.4.15/09_all_lighttpd-1.4.15-mod_fastcgi_local_dos.diff 463 RMD160 b1841be8246289a517b0f3e343a6fc9b9e65bd79 SHA1 3afce133722f96dd68060d1608843609b306519e SHA256 8183e4ded4aabfdf4fd17c857a0f9d10f4de38d9af6249d5569d8884a37c097c
+MD5 12cf0ac9ed7c83a3959685206c0bac08 files/1.4.15/09_all_lighttpd-1.4.15-mod_fastcgi_local_dos.diff 463
+RMD160 b1841be8246289a517b0f3e343a6fc9b9e65bd79 files/1.4.15/09_all_lighttpd-1.4.15-mod_fastcgi_local_dos.diff 463
+SHA256 8183e4ded4aabfdf4fd17c857a0f9d10f4de38d9af6249d5569d8884a37c097c files/1.4.15/09_all_lighttpd-1.4.15-mod_fastcgi_local_dos.diff 463
+AUX 1.4.15/10_all_lighttpd-1.4.15-mod_scgi_crash.diff 530 RMD160 d29aaae504613b2f89592c19bff27c7947b93f0a SHA1 7f9799092aed18ccecd7504e9fad77830c146b55 SHA256 945fea99cb5138d0bcdea1ffb94562de2a5e37b0079a150e900f4ca5dad442f8
+MD5 5d82f3b10f9511949882e2cad1cb3e64 files/1.4.15/10_all_lighttpd-1.4.15-mod_scgi_crash.diff 530
+RMD160 d29aaae504613b2f89592c19bff27c7947b93f0a files/1.4.15/10_all_lighttpd-1.4.15-mod_scgi_crash.diff 530
+SHA256 945fea99cb5138d0bcdea1ffb94562de2a5e37b0079a150e900f4ca5dad442f8 files/1.4.15/10_all_lighttpd-1.4.15-mod_scgi_crash.diff 530
AUX conf/lighttpd.conf 8182 RMD160 450cf40f4ec517331f8932618a3c492cb566e4f3 SHA1 16922786a79807fa3233d1af105a99582d3486a5 SHA256 c0f6951e00d4e8c928f1799a84976ab8bb536bd59a104c13ca9d1d3661d8cebd
MD5 df5b2360ea380d988bf16905ab214286 files/conf/lighttpd.conf 8182
RMD160 450cf40f4ec517331f8932618a3c492cb566e4f3 files/conf/lighttpd.conf 8182
@@ -149,14 +165,18 @@ EBUILD lighttpd-1.4.13.ebuild 5431 RMD160 f56cd0ddad8c2e0ca84c74b5bf6fcf38309199
MD5 cca2c68140d653460de5c5895f3b6d6e lighttpd-1.4.13.ebuild 5431
RMD160 f56cd0ddad8c2e0ca84c74b5bf6fcf38309199a0 lighttpd-1.4.13.ebuild 5431
SHA256 3a62f76a2720f7b1ccc3557d79df36df292bff85e9dc03da6a44d94015f09ad5 lighttpd-1.4.13.ebuild 5431
+EBUILD lighttpd-1.4.15-r1.ebuild 5821 RMD160 e781b95c321e76aab5cb1841d8f2ddc872e57a9e SHA1 72937a3f69cf2ad24cf53a094454509c968c9790 SHA256 364bebe3952f5e65bc636ce07fd1e8d1c828b26ef44e4335d582a42932c21651
+MD5 1968c059d8658b72fba99853208f709c lighttpd-1.4.15-r1.ebuild 5821
+RMD160 e781b95c321e76aab5cb1841d8f2ddc872e57a9e lighttpd-1.4.15-r1.ebuild 5821
+SHA256 364bebe3952f5e65bc636ce07fd1e8d1c828b26ef44e4335d582a42932c21651 lighttpd-1.4.15-r1.ebuild 5821
EBUILD lighttpd-1.4.15.ebuild 5843 RMD160 1fb147ea2d8c47779e38651f7eeb658ca68b3c9e SHA1 99d8000b6d16623756b3b0701b9355418703da0c SHA256 bae4747c4ceb621f7835a085c4425dec168b7ff8e7f81eb5cd046b614e1944d1
MD5 b4b1dd9afc16edb716a3d1889774f991 lighttpd-1.4.15.ebuild 5843
RMD160 1fb147ea2d8c47779e38651f7eeb658ca68b3c9e lighttpd-1.4.15.ebuild 5843
SHA256 bae4747c4ceb621f7835a085c4425dec168b7ff8e7f81eb5cd046b614e1944d1 lighttpd-1.4.15.ebuild 5843
-MISC ChangeLog 30303 RMD160 2bd16a2601b45c57faa5f967bb5750e0e1f0a1a2 SHA1 5e45ec62232eb2ba3c1af6c0f8cf2994ee3aeb67 SHA256 c961082bb95267abbedf0f37c3194029805d0a5d5e70bf7f2fac103fab530a9c
-MD5 d1d4260feecc7dc6afb78a2b8b81774e ChangeLog 30303
-RMD160 2bd16a2601b45c57faa5f967bb5750e0e1f0a1a2 ChangeLog 30303
-SHA256 c961082bb95267abbedf0f37c3194029805d0a5d5e70bf7f2fac103fab530a9c ChangeLog 30303
+MISC ChangeLog 30736 RMD160 c013014d47571f9e5ad1002782d63d0a705db600 SHA1 710795582cc4b240294fa8e7911d82d66216fc1f SHA256 3cead3d29a67ef448b6dfed873fa7a646885f81f5a5af42633af29f6541b1cc1
+MD5 380b0b0a0884c483ab9502cc2c8962d6 ChangeLog 30736
+RMD160 c013014d47571f9e5ad1002782d63d0a705db600 ChangeLog 30736
+SHA256 3cead3d29a67ef448b6dfed873fa7a646885f81f5a5af42633af29f6541b1cc1 ChangeLog 30736
MISC metadata.xml 633 RMD160 f53110608c976ad01e089359eb60da7b8d1d8812 SHA1 f072b189d3973eb56e8bb059197ef2b1683d2790 SHA256 ec78010aee8ea37993d032389ba33c1a00488d0c658e4b25cf096556af8f962e
MD5 d45b737e7a98ec0d98b925eef6462a66 metadata.xml 633
RMD160 f53110608c976ad01e089359eb60da7b8d1d8812 metadata.xml 633
@@ -182,10 +202,13 @@ SHA256 2cde60e43bf9a47baa9efa1aaaaae485d6ebd17c45e093e998c83877f1cd1c6e files/di
MD5 aeb9038042587a68806c8bae25abc8b0 files/digest-lighttpd-1.4.15 250
RMD160 30662c16f3be53c5609f5645ab3846eda1e05c8d files/digest-lighttpd-1.4.15 250
SHA256 92da9c6894ac3d83e16b7d8f90d1811f6740974d519c5d1ba3b6029eab0d1f7c files/digest-lighttpd-1.4.15 250
+MD5 aeb9038042587a68806c8bae25abc8b0 files/digest-lighttpd-1.4.15-r1 250
+RMD160 30662c16f3be53c5609f5645ab3846eda1e05c8d files/digest-lighttpd-1.4.15-r1 250
+SHA256 92da9c6894ac3d83e16b7d8f90d1811f6740974d519c5d1ba3b6029eab0d1f7c files/digest-lighttpd-1.4.15-r1 250
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.5 (GNU/Linux)
+Version: GnuPG v1.4.7-ecc0.1.6 (GNU/Linux)
-iD8DBQFGmeQhyuNVb5qfaOYRAiIoAJ40qhJA5126v2eAcMZvleh8FdJ5yQCfTX8o
-MpfZtre6yDcelIyK654evq0=
-=tYKC
+iD8DBQFGoLymKRy60XGEcJIRAnoKAJ9GKC8sH5hNA/+wyZ+SUdieuE81NwCgjw0A
+zbhiq4OC4M94AYeL8rwm7Mg=
+=T5FI
-----END PGP SIGNATURE-----
diff --git a/www-servers/lighttpd/files/1.4.15/07_all_lighttpd-1.4.15-duplicated_headers_with_folding_crash.diff b/www-servers/lighttpd/files/1.4.15/07_all_lighttpd-1.4.15-duplicated_headers_with_folding_crash.diff
new file mode 100644
index 000000000000..6bb175a657b1
--- /dev/null
+++ b/www-servers/lighttpd/files/1.4.15/07_all_lighttpd-1.4.15-duplicated_headers_with_folding_crash.diff
@@ -0,0 +1,122 @@
+Index: src/request.c
+===================================================================
+--- src/request.c (revision 1868)
++++ src/request.c (revision 1870)
+@@ -284,8 +284,6 @@
+
+ int done = 0;
+
+- data_string *ds = NULL;
+-
+ /*
+ * Request: "^(GET|POST|HEAD) ([^ ]+(\\?[^ ]+|)) (HTTP/1\\.[01])$"
+ * Option : "^([-a-zA-Z]+): (.+)$"
+@@ -715,12 +713,24 @@
+ switch(*cur) {
+ case '\r':
+ if (con->parse_request->ptr[i+1] == '\n') {
++ data_string *ds = NULL;
++
+ /* End of Headerline */
+ con->parse_request->ptr[i] = '\0';
+ con->parse_request->ptr[i+1] = '\0';
+
+ if (in_folding) {
+- if (!ds) {
++ buffer *key_b;
++ /**
++ * we use a evil hack to handle the line-folding
++ *
++ * As array_insert_unique() deletes 'ds' in the case of a duplicate
++ * ds points somewhere and we get a evil crash. As a solution we keep the old
++ * "key" and get the current value from the hash and append us
++ *
++ * */
++
++ if (!key || !key_len) {
+ /* 400 */
+
+ if (srv->srvconf.log_request_header_on_error) {
+@@ -737,7 +747,15 @@
+ con->response.keep_alive = 0;
+ return 0;
+ }
+- buffer_append_string(ds->value, value);
++
++ key_b = buffer_init();
++ buffer_copy_string_len(key_b, key, key_len);
++
++ if (NULL != (ds = (data_string *)array_get_element(con->request.headers, key_b->ptr))) {
++ buffer_append_string(ds->value, value);
++ }
++
++ buffer_free(key_b);
+ } else {
+ int s_len;
+ key = con->parse_request->ptr + first;
+@@ -969,7 +987,12 @@
+ first = i+1;
+ is_key = 1;
+ value = 0;
+- key_len = 0;
++#if 0
++ /**
++ * for Bug 1230 keep the key_len a live
++ */
++ key_len = 0;
++#endif
+ in_folding = 0;
+ } else {
+ if (srv->srvconf.log_request_header_on_error) {
+Index: tests/core-request.t
+===================================================================
+--- tests/core-request.t (revision 1868)
++++ tests/core-request.t (revision 1870)
+@@ -8,7 +8,7 @@
+
+ use strict;
+ use IO::Socket;
+-use Test::More tests => 33;
++use Test::More tests => 36;
+ use LightyTest;
+
+ my $tf = LightyTest->new();
+@@ -273,6 +273,38 @@
+ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ ok($tf->handle_http($t) == 0, 'uppercase filenames');
+
++$t->{REQUEST} = ( <<EOF
++GET / HTTP/1.0
++Location: foo
++Location: foobar
++ baz
++EOF
++ );
++$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
++ok($tf->handle_http($t) == 0, '#1232 - duplicate headers with line-wrapping');
+
++$t->{REQUEST} = ( <<EOF
++GET / HTTP/1.0
++Location:
++Location: foobar
++ baz
++EOF
++ );
++$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
++ok($tf->handle_http($t) == 0, '#1232 - duplicate headers with line-wrapping - test 2');
++
++$t->{REQUEST} = ( <<EOF
++GET / HTTP/1.0
++A:
++Location: foobar
++ baz
++EOF
++ );
++$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
++ok($tf->handle_http($t) == 0, '#1232 - duplicate headers with line-wrapping - test 3');
++
++
++
++
+ ok($tf->stop_proc == 0, "Stopping lighttpd");
+
diff --git a/www-servers/lighttpd/files/1.4.15/08_all_lighttpd-1.4.15-mod_acces_bypass.diff b/www-servers/lighttpd/files/1.4.15/08_all_lighttpd-1.4.15-mod_acces_bypass.diff
new file mode 100644
index 000000000000..3165cd7b7012
--- /dev/null
+++ b/www-servers/lighttpd/files/1.4.15/08_all_lighttpd-1.4.15-mod_acces_bypass.diff
@@ -0,0 +1,129 @@
+Index: src/mod_access.c
+===================================================================
+--- src/mod_access.c (revision 1870)
++++ src/mod_access.c (revision 1871)
+@@ -111,6 +111,15 @@
+ }
+ #undef PATCH
+
++/**
++ * URI handler
++ *
++ * we will get called twice:
++ * - after the clean up of the URL and
++ * - after the pathinfo checks are done
++ *
++ * this handles the issue of trailing slashes
++ */
+ URIHANDLER_FUNC(mod_access_uri_handler) {
+ plugin_data *p = p_d;
+ int s_len;
+@@ -122,28 +131,41 @@
+
+ s_len = con->uri.path->used - 1;
+
++ if (con->conf.log_request_handling) {
++ log_error_write(srv, __FILE__, __LINE__, "s",
++ "-- mod_access_uri_handler called");
++ }
++
+ for (k = 0; k < p->conf.access_deny->used; k++) {
+ data_string *ds = (data_string *)p->conf.access_deny->data[k];
+ int ct_len = ds->value->used - 1;
++ int denied = 0;
+
++
+ if (ct_len > s_len) continue;
+-
+ if (ds->value->used == 0) continue;
+
+ /* if we have a case-insensitive FS we have to lower-case the URI here too */
+
+ if (con->conf.force_lowercase_filenames) {
+ if (0 == strncasecmp(con->uri.path->ptr + s_len - ct_len, ds->value->ptr, ct_len)) {
+- con->http_status = 403;
+-
+- return HANDLER_FINISHED;
++ denied = 1;
+ }
+ } else {
+ if (0 == strncmp(con->uri.path->ptr + s_len - ct_len, ds->value->ptr, ct_len)) {
+- con->http_status = 403;
++ denied = 1;
++ }
++ }
+
+- return HANDLER_FINISHED;
++ if (denied) {
++ con->http_status = 403;
++
++ if (con->conf.log_request_handling) {
++ log_error_write(srv, __FILE__, __LINE__, "sb",
++ "url denied as we match:", ds->value);
+ }
++
++ return HANDLER_FINISHED;
+ }
+ }
+
+@@ -158,7 +180,8 @@
+
+ p->init = mod_access_init;
+ p->set_defaults = mod_access_set_defaults;
+- p->handle_uri_clean = mod_access_uri_handler;
++ p->handle_uri_clean = mod_access_uri_handler;
++ p->handle_subrequest_start = mod_access_uri_handler;
+ p->cleanup = mod_access_free;
+
+ p->data = NULL;
+Index: tests/mod-access.t
+===================================================================
+--- tests/mod-access.t (revision 1870)
++++ tests/mod-access.t (revision 1871)
+@@ -8,7 +8,7 @@
+
+ use strict;
+ use IO::Socket;
+-use Test::More tests => 3;
++use Test::More tests => 4;
+ use LightyTest;
+
+ my $tf = LightyTest->new();
+@@ -23,5 +23,12 @@
+ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ];
+ ok($tf->handle_http($t) == 0, 'forbid access to ...~');
+
++$t->{REQUEST} = ( <<EOF
++GET /index.html~/ HTTP/1.0
++EOF
++ );
++$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ];
++ok($tf->handle_http($t) == 0, '#1230 - forbid access to ...~ - trailing slash');
++
+ ok($tf->stop_proc == 0, "Stopping lighttpd");
+
+Index: tests/prepare.sh
+===================================================================
+--- tests/prepare.sh (revision 1870)
++++ tests/prepare.sh (revision 1871)
+@@ -25,6 +25,7 @@
+ # copy everything into the right places
+ cp $srcdir/docroot/www/*.html \
+ $srcdir/docroot/www/*.php \
++ $srcdir/docroot/www/*.html~ \
+ $srcdir/docroot/www/*.pl \
+ $srcdir/docroot/www/*.fcgi \
+ $srcdir/docroot/www/*.shtml \
+Index: tests/docroot/www/index.html~
+===================================================================
+Index: tests/docroot/www/Makefile.am
+===================================================================
+--- tests/docroot/www/Makefile.am (revision 1870)
++++ tests/docroot/www/Makefile.am (revision 1871)
+@@ -1,5 +1,5 @@
+ EXTRA_DIST=cgi.php cgi.pl dummydir index.html index.txt phpinfo.php \
+ redirect.php cgi-pathinfo.pl get-env.php get-server-env.php \
+ nph-status.pl prefix.fcgi get-header.pl ssi.shtml get-post-len.pl \
+- exec-date.shtml
++ exec-date.shtml index.html~
+ SUBDIRS=go indexfile expire
diff --git a/www-servers/lighttpd/files/1.4.15/09_all_lighttpd-1.4.15-mod_fastcgi_local_dos.diff b/www-servers/lighttpd/files/1.4.15/09_all_lighttpd-1.4.15-mod_fastcgi_local_dos.diff
new file mode 100644
index 000000000000..7c8f4e91c1e6
--- /dev/null
+++ b/www-servers/lighttpd/files/1.4.15/09_all_lighttpd-1.4.15-mod_fastcgi_local_dos.diff
@@ -0,0 +1,12 @@
+Index: src/mod_fastcgi.c
+===================================================================
+--- src/mod_fastcgi.c (revision 1878)
++++ src/mod_fastcgi.c (revision 1879)
+@@ -2440,7 +2440,6 @@
+ b->used = r + 1; /* one extra for the fake \0 */
+ b->ptr[b->used - 1] = '\0';
+ } else {
+- if (errno == EAGAIN) return 0;
+ log_error_write(srv, __FILE__, __LINE__, "ssdsb",
+ "unexpected end-of-file (perhaps the fastcgi process died):",
+ "pid:", proc->pid,
diff --git a/www-servers/lighttpd/files/1.4.15/10_all_lighttpd-1.4.15-mod_scgi_crash.diff b/www-servers/lighttpd/files/1.4.15/10_all_lighttpd-1.4.15-mod_scgi_crash.diff
new file mode 100644
index 000000000000..f5bb6a128b1b
--- /dev/null
+++ b/www-servers/lighttpd/files/1.4.15/10_all_lighttpd-1.4.15-mod_scgi_crash.diff
@@ -0,0 +1,12 @@
+diff -Nura lighttpd-1.4.15/src/mod_scgi.c lighttpd-1.4.15-scgi/src/mod_scgi.c
+--- lighttpd-1.4.15/src/mod_scgi.c 2007-02-08 13:34:45.000000000 -0300
++++ lighttpd-1.4.15-scgi/src/mod_scgi.c 2007-07-20 10:35:41.000000000 -0300
+@@ -2536,7 +2536,7 @@
+ return HANDLER_WAIT_FOR_FD;
+ }
+
+- log_error_write(srv, __FILE__, __LINE__, "sdsdsd",
++ log_error_write(srv, __FILE__, __LINE__, "sosdsd",
+ "response not sent, request sent:", hctx->wb->bytes_out,
+ "connection-fd:", con->fd,
+ "fcgi-fd:", hctx->fd);
diff --git a/www-servers/lighttpd/files/digest-lighttpd-1.4.15-r1 b/www-servers/lighttpd/files/digest-lighttpd-1.4.15-r1
new file mode 100644
index 000000000000..0b575e222c44
--- /dev/null
+++ b/www-servers/lighttpd/files/digest-lighttpd-1.4.15-r1
@@ -0,0 +1,3 @@
+MD5 b994b8c359da578dec073cae52c4924f lighttpd-1.4.15.tar.bz2 591304
+RMD160 6a0f7a498b2815c2eb576917e88775a8e16aad5c lighttpd-1.4.15.tar.bz2 591304
+SHA256 75128e53231c69a22c94ad0a01da974eaa266b21668c1354f71ad07e5f94d9cc lighttpd-1.4.15.tar.bz2 591304
diff --git a/www-servers/lighttpd/lighttpd-1.4.15-r1.ebuild b/www-servers/lighttpd/lighttpd-1.4.15-r1.ebuild
new file mode 100644
index 000000000000..c6c020a8ff75
--- /dev/null
+++ b/www-servers/lighttpd/lighttpd-1.4.15-r1.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/lighttpd-1.4.15-r1.ebuild,v 1.1 2007/07/20 13:46:14 gustavoz Exp $
+
+WANT_AUTOCONF=latest
+WANT_AUTOMAKE=latest
+inherit eutils autotools depend.php
+
+DESCRIPTION="Lightweight high-performance web server"
+HOMEPAGE="http://www.lighttpd.net/"
+SRC_URI="http://www.lighttpd.net/download/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="bzip2 doc fam fastcgi gdbm ipv6 ldap lua minimal memcache mysql pcre php rrdtool ssl test webdav xattr"
+
+RDEPEND=">=sys-libs/zlib-1.1
+ bzip2? ( app-arch/bzip2 )
+ fam? ( virtual/fam )
+ gdbm? ( sys-libs/gdbm )
+ ldap? ( >=net-nds/openldap-2.1.26 )
+ lua? ( >=dev-lang/lua-5.1 )
+ memcache? ( dev-libs/libmemcache )
+ mysql? ( >=virtual/mysql-4.0 )
+ pcre? ( >=dev-libs/libpcre-3.1 )
+ php? ( virtual/httpd-php )
+ rrdtool? ( net-analyzer/rrdtool )
+ ssl? ( >=dev-libs/openssl-0.9.7 )
+ webdav? (
+ dev-libs/libxml2
+ >=dev-db/sqlite-3
+ sys-fs/e2fsprogs
+ )
+ xattr? ( kernel_linux? ( sys-apps/attr ) )"
+
+DEPEND="${RDEPEND}
+ doc? ( dev-python/docutils )
+ test? (
+ virtual/perl-Test-Harness
+ dev-libs/fcgi
+ )"
+
+# update certain parts of lighttpd.conf based on conditionals
+update_config() {
+ local config="/etc/lighttpd/lighttpd.conf"
+
+ # enable php/mod_fastcgi settings
+ use php && \
+ dosed 's|#.*\(include.*fastcgi.*$\)|\1|' ${config}
+
+ # enable stat() caching
+ use fam && \
+ dosed 's|#\(.*stat-cache.*$\)|\1|' ${config}
+}
+
+# remove non-essential stuff (for USE=minimal)
+remove_non_essential() {
+ local libdir="${D}/usr/$(get_libdir)/${PN}"
+
+ # text docs
+ use doc || rm -fr ${D}/usr/share/doc/${PF}/txt
+
+ # non-essential modules
+ rm -f \
+ ${libdir}/mod_{compress,evhost,expire,proxy,scgi,secdownload,simple_vhost,status,setenv,trigger*,usertrack}.*
+
+ # allow users to keep some based on USE flags
+ use pcre || rm -f ${libdir}/mod_{ssi,re{direct,write}}.*
+ use webdav || rm -f ${libdir}/mod_webdav.*
+ use mysql || rm -f ${libdir}/mod_mysql_vhost.*
+ use lua || rm -f ${libdir}/mod_{cml,magnet}.*
+ use rrdtool || rm -f ${libdir}/mod_rrdtool.*
+
+ if ! use fastcgi ; then
+ rm -f ${libdir}/mod_fastcgi.* ${D}/usr/bin/spawn-fcgi \
+ ${D}/usr/share/man/man1/spawn-fcgi.*
+ fi
+}
+
+pkg_setup() {
+ if ! use pcre ; then
+ ewarn "It is highly recommended that you build ${PN}"
+ ewarn "with perl regular expressions support via USE=pcre."
+ ewarn "Otherwise you lose support for some core options such"
+ ewarn "as conditionals and modules such as mod_re{write,direct}"
+ ewarn "and mod_ssi."
+ ebeep 5
+ fi
+
+ use php && require_php_with_use cgi
+
+ enewgroup lighttpd
+ enewuser lighttpd -1 -1 /var/www/localhost/htdocs lighttpd
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ EPATCH_SUFFIX="diff" EPATCH_OPTS="-l" epatch ${FILESDIR}/1.4.15 || die "Patching failed!"
+
+ eautoreconf || die
+
+ # dev-python/docutils installs rst2html.py not rst2html
+ sed -i -e 's|\(rst2html\)|\1.py|g' doc/Makefile.in || \
+ die "sed doc/Makefile.in failed"
+
+ # fix typo
+ sed -i -e 's|\(output_content\)_\(type\)|\1\2|' doc/cml.txt || \
+ die "sed doc/cml.txt failed"
+}
+
+src_compile() {
+ econf --libdir=/usr/$(get_libdir)/${PN} \
+ --enable-lfs \
+ $(use_enable ipv6) \
+ $(use_with bzip2) \
+ $(use_with fam) \
+ $(use_with gdbm) \
+ $(use_with lua) \
+ $(use_with ldap) \
+ $(use_with memcache) \
+ $(use_with mysql) \
+ $(use_with pcre) \
+ $(use_with ssl openssl) \
+ $(use_with webdav webdav-props) \
+ $(use_with webdav webdav-locks) \
+ $(use_with xattr attr) \
+ || die "econf failed"
+
+ emake || die "emake failed"
+
+ if use doc ; then
+ einfo "Building HTML documentation"
+ cd doc
+ emake html || die "failed to build HTML documentation"
+ fi
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+
+ # init script stuff
+ newinitd ${FILESDIR}/lighttpd.initd-1.4.13-r2 lighttpd || die
+ newconfd ${FILESDIR}/lighttpd.confd lighttpd || die
+ use fam && has_version app-admin/fam && \
+ sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd
+
+ if use php || use fastcgi ; then
+ newinitd ${FILESDIR}/spawn-fcgi.initd spawn-fcgi || die
+ newconfd ${FILESDIR}/spawn-fcgi.confd spawn-fcgi || die
+ fi
+
+ # configs
+ insinto /etc/lighttpd
+ doins ${FILESDIR}/conf/lighttpd.conf
+ doins ${FILESDIR}/conf/mime-types.conf
+ doins ${FILESDIR}/conf/mod_cgi.conf
+ newins ${FILESDIR}/conf/mod_fastcgi.conf-1.4.13-r2 mod_fastcgi.conf
+ # Secure directory for fastcgi sockets
+ keepdir /var/run/lighttpd/
+ fperms 0750 /var/run/lighttpd/
+ fowners lighttpd:lighttpd /var/run/lighttpd/
+
+ # update lighttpd.conf directives based on conditionals
+ update_config
+
+ # docs
+ dodoc AUTHORS README NEWS ChangeLog doc/*.sh
+ newdoc doc/lighttpd.conf lighttpd.conf.distrib
+
+ use doc && dohtml -r doc/*
+
+ docinto txt
+ dodoc doc/*.txt
+
+ # logrotate
+ insinto /etc/logrotate.d
+ newins ${FILESDIR}/lighttpd.logrotate lighttpd || die
+
+ keepdir /var/l{ib,og}/lighttpd /var/www/localhost/htdocs
+ fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd
+ fperms 0750 /var/l{ib,og}/lighttpd
+
+ use minimal && remove_non_essential
+}
+
+pkg_postinst () {
+ echo
+ if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then
+ einfo "spawn-fcgi is now included with lighttpd"
+ einfo "spawn-fcgi's init script configuration is now located"
+ einfo "at /etc/conf.d/spawn-fcgi."
+ echo
+ fi
+
+ if [[ -f ${ROOT}etc/lighttpd.conf ]] ; then
+ ewarn "As of lighttpd-1.4.1, Gentoo has a customized configuration,"
+ ewarn "which is now located in /etc/lighttpd. Please migrate your"
+ ewarn "existing configuration."
+ ebeep 5
+ fi
+
+ if use fam ; then
+ einfo "Remember to re-emerge lighttpd should you switch from"
+ einfo "app-admin/famd to app-admin/gamin or vice versa."
+ fi
+ echo
+}