# ChangeLog for dev-libs/fcgi
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/fcgi/ChangeLog,v 1.59 2013/05/16 01:40:54 rafaelmartins Exp $
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/fcgi/ChangeLog,v 1.60 2015/02/07 00:02:27 rafaelmartins Exp $
+
+*fcgi-2.4.1_pre0910052249-r2 (07 Feb 2015)
+
+ 07 Feb 2015; Rafael G. Martins <rafaelmartins@gentoo.org>
+ +fcgi-2.4.1_pre0910052249-r2.ebuild,
+ +files/fcgi-2.4.1_pre0910052249-poll.patch,
+ -fcgi-2.4.1_pre0910052249-r1.ebuild:
+ Fixed DoS vulnerability. bug #539164
16 May 2013; Rafael G. Martins <rafaelmartins@gentoo.org> metadata.xml:
New maintainer
AUX fcgi-2.4.0-html-updates.patch 2527 SHA256 df8b2eb4c017fedf6f27a5650e2f4f5636e66ec7d02d20a50282edbc8d636c69 SHA512 79abe9f43150b3163e92030cc9afbee90f69f04bd487254d187abda6fa3484623f605394c96eeb6fd4203d2b06f7e771c9b46f9c21b03cde1aa043da9b3e8d5e WHIRLPOOL 101c77ec045cfa8096b4a6391a12daec9a114dacb594e97c9a66dcca3067d3f67b004dce2cd1246d528ae4b704c880785149418ece7ddf0b71a28f220201afa5
AUX fcgi-2.4.1_pre0311112127-gcc44.patch 202 SHA256 0c15ebe26a69939694e7ed3d9b408ef782688646fc3dc64235f63215c4ac860f SHA512 bb69535695c21151edc538e64dfae095bc61abd5d612d79f73ab3be1a6ecca9d8c2d44f4590e539934820607c5d01ae81e8e71b3b4252aa9270fa638d7776ebf WHIRLPOOL 095b8b4cd5ceb4222e6926ccf93e483190e46cd5c61afd0ab7d30b70e937f65a4a66c3b95156acd9546cfde5928027a497ac06fa7b2387875762e393883c246c
AUX fcgi-2.4.1_pre0910052249-link.patch 850 SHA256 4b1c6d626c4d4c142f1e2c8451a719c6287f0a9d436fa9dd6aee9be304d19c67 SHA512 6180201e3ac7e9fe659b281cc612ed7d6d58acc17f670feba843931c5b038a7d08e75a9f24b098413bc309cb1cdbc6b96ba77f6f1fb43e47066815937d622b52 WHIRLPOOL 044859de666d9de26acc0e63015987de4f5418be2dcf8826b39a7de8aa9ca564baae1d2477b9f353e66b87da476e78cb159e2ad1198e40c97ad4e974e0e31be7
+AUX fcgi-2.4.1_pre0910052249-poll.patch 2469 SHA256 4fe785d772b91185338b93af1f3eb8ec68e21a4a71d09e81f41a645e82c71e10 SHA512 3c00be90012bb7b9aabcce0eb014b2b0a8ec0bb8d4a44389237ae1c88fd46129e7686b035a427177545762275c30151c8a1037258b409486706a7f3a64db70b1 WHIRLPOOL e1dd7bf9464d838723d8ad450150f953e5dc8010f3341d9633652ef97eb450493ca01988099bf507adba3f31ec6fdcbc24ad79331c6c27c1dd50a51d65da949e
DIST fcgi-2.4.1-SNAP-0910052249.tar.gz 614929 SHA256 829dc89a0a372c7b0b172303ec9b42e9d20615d6d0e9fc81570fdac6c41a0f30 SHA512 7ae7542ef0934f44d8c7a120366a5cd92639d0bc283a16be320c9218a73a0302c961cc004074e3915209690f1e2b67fc234c9ba55d35af11e31566d79f081c87 WHIRLPOOL ce454ec8bc549cc4b9e1c86fe145f1cc863160415cab0a7e2fc6b88e8aadb996a612e358789e8a15a898cdfcf79e34e77686160a26f84e052f4e5826dbef2f5d
-EBUILD fcgi-2.4.1_pre0910052249-r1.ebuild 1380 SHA256 ac02ddcdeef230c1ea72dc7cd6dba91138f0fd001f76bd568ef5c2ac68d118f4 SHA512 049f90bf308c6f34cba506eda99b998de5a4bb23f32bdeff2c4a9f7f3e8627c5f23d72cbd04c9fab7be286a4dc08f48b17cf61eba61503110d0791c53632fde1 WHIRLPOOL 066278b003fe2adffe6ca81529a30e0f5428dcbdf2c14dbc3aaa5a1311e9d422110547e87817e2b6a41ae9316efa64a40fa5a446feb574792d4aac4fbe5119ae
+EBUILD fcgi-2.4.1_pre0910052249-r2.ebuild 1425 SHA256 0779d6b702c04b78a06f1c2f2edd0e7ddaef0cb5a9ee3f129e458b3fdcc07b86 SHA512 104782df6cc555b368413218e9e7929bedd0e81bf65dbb975bdde1ac603ac26c72a19c1966633225716906a34bd9ce039c931368fe645a35f63da7a6a173a81d WHIRLPOOL efeb8444d1909a2a208cac7e0a07f26efd413425b70beccdff81f5eb975875ff96e49f01c98db8e30df116dbc08674b827f95e2af461bda80fc6d367bf6a3110
EBUILD fcgi-2.4.1_pre0910052249.ebuild 1329 SHA256 14b204b0a1cc05c88dfc41f3a9f265cbf593664a90845318bd07a35cc6716feb SHA512 57a800f0a0272c5a159c75ff6ddc76a43af010e31d01d528c46b995e6d998f816745b198729e31a0878016e5a9cb5079dba4790366af44224915ed050bc142d5 WHIRLPOOL 0a88904494a1052ad014d5d47283c7852a75cf67e44e7e3d5a13f17a40b1888a32b0328b94d44afa7ca006af72b35f9972b59a62deb100247bdc9de7d59cef6b
-MISC ChangeLog 7433 SHA256 cadc195fefd207b388018ac443a85c1e42f9c1b495667913309e8543d138499c SHA512 cadb2d32c3200c47ca5463f96adc2115c6509414cc1eb0e89eac95472373ca992b3e6f0b3bed3d915b5e4f69946aaf78f7f59655962845d0c5fc54018516b9bf WHIRLPOOL c177ae8a6628455d51c1a9583c121e7d1dd4a40f4b7c4f86058bbd80fb34e9967187666ac4c2c290fd2bbfcaf7a5613e774360f596b938ab5c6a593b04a15486
+MISC ChangeLog 7701 SHA256 89bb42bf92e808c99b83e966b66b2899ac45e5749575d36965073db358f4dd05 SHA512 818e11c83d577142484a28e8b03365390e4033ef66a8d65e69eb8882d7958baa8472a99ee4bd8af765dc158280abd74a2b9ba4f4c72b5702e29b002a83f211e8 WHIRLPOOL b35926f75c1aa4a626314f7fc0ad346c826661f232b5db2276cca2aedd02a165973c647b20c8527201998ce78f0aa8372809301e4845959f1511bab6159b44ad
MISC metadata.xml 308 SHA256 f0e20c90a5d7d286a8edba60e88eed4d3017ea26e8fd6fc904a31277d1ca5b51 SHA512 eb5a9cf2705918f8f5eb32e5408174b7471c7339ea5dca3dbb674d0c0444245850cc5b4d2f5189f200186f554cb3d803a2379ae522087fc9cb6bfd32155633dd WHIRLPOOL 48507e57d7826fd199fae80921b47edd864ef3e65d8b2842753853923c118c38da31fdcc8f46ad1b79a6ac7f4f283fbbba53d4d7bc8d618f5e3d70fc96603dc2
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/fcgi/fcgi-2.4.1_pre0910052249-r1.ebuild,v 1.1 2012/10/29 15:00:44 ottxor Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/fcgi/fcgi-2.4.1_pre0910052249-r2.ebuild,v 1.1 2015/02/07 00:02:27 rafaelmartins Exp $
EAPI="4"
epatch "${FILESDIR}/fcgi-2.4.0-html-updates.patch"
epatch "${FILESDIR}"/fcgi-2.4.1_pre0311112127-gcc44.patch
epatch "${FILESDIR}"/${P}-link.patch
+ epatch "${FILESDIR}"/${P}-poll.patch
eautoreconf
}
--- /dev/null
+diff -uNr fcgi-2.4.1-SNAP-0910052249.orig/libfcgi/os_unix.c fcgi-2.4.1-SNAP-0910052249/libfcgi/os_unix.c
+--- fcgi-2.4.1-SNAP-0910052249.orig/libfcgi/os_unix.c 2015-02-06 21:49:40.677082591 -0200
++++ fcgi-2.4.1-SNAP-0910052249/libfcgi/os_unix.c 2015-02-06 21:54:23.147097903 -0200
+@@ -42,6 +42,7 @@
+ #include <sys/time.h>
+ #include <sys/un.h>
+ #include <signal.h>
++#include <poll.h>
+
+ #ifdef HAVE_NETDB_H
+ #include <netdb.h>
+@@ -103,6 +104,9 @@
+ static int shutdownPending = FALSE;
+ static int shutdownNow = FALSE;
+
++static int libfcgiOsClosePollTimeout = 2000;
++static int libfcgiIsAfUnixKeeperPollTimeout = 2000;
++
+ void OS_ShutdownPending()
+ {
+ shutdownPending = TRUE;
+@@ -169,6 +173,16 @@
+ if(libInitialized)
+ return 0;
+
++ char *libfcgiOsClosePollTimeoutStr = getenv( "LIBFCGI_OS_CLOSE_POLL_TIMEOUT" );
++ if(libfcgiOsClosePollTimeoutStr) {
++ libfcgiOsClosePollTimeout = atoi(libfcgiOsClosePollTimeoutStr);
++ }
++
++ char *libfcgiIsAfUnixKeeperPollTimeoutStr = getenv( "LIBFCGI_IS_AF_UNIX_KEEPER_POLL_TIMEOUT" );
++ if(libfcgiIsAfUnixKeeperPollTimeoutStr) {
++ libfcgiIsAfUnixKeeperPollTimeout = atoi(libfcgiIsAfUnixKeeperPollTimeoutStr);
++ }
++
+ asyncIoTable = (AioInfo *)malloc(asyncIoTableSize * sizeof(AioInfo));
+ if(asyncIoTable == NULL) {
+ errno = ENOMEM;
+@@ -780,19 +794,16 @@
+ {
+ if (shutdown(fd, 1) == 0)
+ {
+- struct timeval tv;
+- fd_set rfds;
++ struct pollfd pfd;
+ int rv;
+ char trash[1024];
+
+- FD_ZERO(&rfds);
++ pfd.fd = fd;
++ pfd.events = POLLIN;
+
+ do
+ {
+- FD_SET(fd, &rfds);
+- tv.tv_sec = 2;
+- tv.tv_usec = 0;
+- rv = select(fd + 1, &rfds, NULL, NULL, &tv);
++ rv = poll(&pfd, 1, libfcgiOsClosePollTimeout);
+ }
+ while (rv > 0 && read(fd, trash, sizeof(trash)) > 0);
+ }
+@@ -1142,13 +1153,11 @@
+ */
+ static int is_af_unix_keeper(const int fd)
+ {
+- struct timeval tval = { READABLE_UNIX_FD_DROP_DEAD_TIMEVAL };
+- fd_set read_fds;
+-
+- FD_ZERO(&read_fds);
+- FD_SET(fd, &read_fds);
++ struct pollfd pfd;
++ pfd.fd = fd;
++ pfd.events = POLLIN;
+
+- return select(fd + 1, &read_fds, NULL, NULL, &tval) >= 0 && FD_ISSET(fd, &read_fds);
++ return poll(&pfd, 1, libfcgiIsAfUnixKeeperPollTimeout) >= 0 && (pfd.revents & POLLIN);
+ }
+
+ /*