From 6c19507c12f0c7184d6274bef2e7474428e6fb46 Mon Sep 17 00:00:00 2001 From: Luca Longinotti Date: Sat, 29 Oct 2005 22:16:13 +0000 Subject: Old-style PHP update, fixes a couple of bugs. (Portage version: 2.0.53_rc6) --- dev-php/mod_php/ChangeLog | 20 +- dev-php/mod_php/Manifest | 52 ++-- dev-php/mod_php/files/digest-mod_php-4.3.11 | 2 +- dev-php/mod_php/files/digest-mod_php-4.3.11-r1 | 2 +- dev-php/mod_php/files/digest-mod_php-4.3.11-r2 | 5 + dev-php/mod_php/files/digest-mod_php-4.4.0 | 4 +- dev-php/mod_php/files/digest-mod_php-4.4.0-r1 | 4 +- dev-php/mod_php/files/digest-mod_php-4.4.0-r2 | 4 +- dev-php/mod_php/files/digest-mod_php-4.4.0-r3 | 4 +- dev-php/mod_php/files/digest-mod_php-4.4.0-r4 | 5 + dev-php/mod_php/files/digest-mod_php-4.4.0-r5 | 5 + .../mod_php/files/php4.3.11-fopen_wrappers.patch | 46 +++ dev-php/mod_php/files/php4.3.11-gd_safe_mode.patch | 39 +++ .../mod_php/files/php4.3.11-pspell-ext-segf.patch | 317 +++++++++++++++++++++ .../files/php4.3.11-session_save_path-segf.patch | 154 ++++++++++ .../mod_php/files/php4.4.0-fopen_wrappers.patch | 46 +++ dev-php/mod_php/files/php4.4.0-gd_safe_mode.patch | 20 ++ .../mod_php/files/php4.4.0-pspell-ext-segf.patch | 317 +++++++++++++++++++++ .../files/php4.4.0-session_save_path-segf.patch | 127 +++++++++ dev-php/mod_php/files/stdint.diff | 11 - dev-php/mod_php/files/with-iodbc.diff | 13 - dev-php/mod_php/mod_php-4.3.11-r1.ebuild | 6 +- dev-php/mod_php/mod_php-4.3.11-r2.ebuild | 238 ++++++++++++++++ dev-php/mod_php/mod_php-4.3.11.ebuild | 4 +- dev-php/mod_php/mod_php-4.4.0-r1.ebuild | 4 +- dev-php/mod_php/mod_php-4.4.0-r2.ebuild | 6 +- dev-php/mod_php/mod_php-4.4.0-r3.ebuild | 4 +- dev-php/mod_php/mod_php-4.4.0-r4.ebuild | 235 +++++++++++++++ dev-php/mod_php/mod_php-4.4.0-r5.ebuild | 221 ++++++++++++++ dev-php/mod_php/mod_php-4.4.0.ebuild | 4 +- dev-php/php-cgi/ChangeLog | 19 +- dev-php/php-cgi/Manifest | 41 ++- dev-php/php-cgi/files/digest-php-cgi-4.3.11-r1 | 2 +- dev-php/php-cgi/files/digest-php-cgi-4.3.11-r2 | 2 +- dev-php/php-cgi/files/digest-php-cgi-4.3.11-r3 | 5 + dev-php/php-cgi/files/digest-php-cgi-4.4.0 | 4 +- dev-php/php-cgi/files/digest-php-cgi-4.4.0-r1 | 4 +- dev-php/php-cgi/files/digest-php-cgi-4.4.0-r2 | 4 +- dev-php/php-cgi/files/digest-php-cgi-4.4.0-r3 | 5 + .../php-cgi/files/php4.3.11-fopen_wrappers.patch | 46 +++ dev-php/php-cgi/files/php4.3.11-gd_safe_mode.patch | 39 +++ .../php-cgi/files/php4.3.11-pspell-ext-segf.patch | 317 +++++++++++++++++++++ .../files/php4.3.11-session_save_path-segf.patch | 154 ++++++++++ .../php-cgi/files/php4.4.0-fopen_wrappers.patch | 46 +++ dev-php/php-cgi/files/php4.4.0-gd_safe_mode.patch | 20 ++ .../php-cgi/files/php4.4.0-pspell-ext-segf.patch | 317 +++++++++++++++++++++ .../files/php4.4.0-session_save_path-segf.patch | 127 +++++++++ dev-php/php-cgi/files/stdint.diff | 11 - dev-php/php-cgi/php-cgi-4.3.11-r1.ebuild | 10 +- dev-php/php-cgi/php-cgi-4.3.11-r2.ebuild | 22 +- dev-php/php-cgi/php-cgi-4.3.11-r3.ebuild | 86 ++++++ dev-php/php-cgi/php-cgi-4.4.0-r1.ebuild | 4 +- dev-php/php-cgi/php-cgi-4.4.0-r2.ebuild | 16 +- dev-php/php-cgi/php-cgi-4.4.0-r3.ebuild | 79 +++++ dev-php/php-cgi/php-cgi-4.4.0.ebuild | 6 +- dev-php/php/ChangeLog | 18 +- dev-php/php/Manifest | 42 +-- dev-php/php/files/digest-php-4.3.11 | 2 +- dev-php/php/files/digest-php-4.3.11-r1 | 2 +- dev-php/php/files/digest-php-4.3.11-r2 | 4 + dev-php/php/files/digest-php-4.4.0 | 4 +- dev-php/php/files/digest-php-4.4.0-r1 | 4 +- dev-php/php/files/digest-php-4.4.0-r2 | 4 + dev-php/php/files/libmbfl-headers.patch | 11 - dev-php/php/files/php4.3.11-fopen_wrappers.patch | 46 +++ dev-php/php/files/php4.3.11-gd_safe_mode.patch | 39 +++ dev-php/php/files/php4.3.11-pspell-ext-segf.patch | 317 +++++++++++++++++++++ .../files/php4.3.11-session_save_path-segf.patch | 154 ++++++++++ dev-php/php/files/php4.4.0-fopen_wrappers.patch | 46 +++ dev-php/php/files/php4.4.0-gd_safe_mode.patch | 20 ++ dev-php/php/files/php4.4.0-pspell-ext-segf.patch | 317 +++++++++++++++++++++ .../files/php4.4.0-session_save_path-segf.patch | 127 +++++++++ dev-php/php/files/stdint.diff | 11 - dev-php/php/php-4.3.11-r1.ebuild | 20 +- dev-php/php/php-4.3.11-r2.ebuild | 83 ++++++ dev-php/php/php-4.3.11.ebuild | 8 +- dev-php/php/php-4.4.0-r1.ebuild | 16 +- dev-php/php/php-4.4.0-r2.ebuild | 77 +++++ dev-php/php/php-4.4.0.ebuild | 4 +- 79 files changed, 4469 insertions(+), 212 deletions(-) create mode 100644 dev-php/mod_php/files/digest-mod_php-4.3.11-r2 create mode 100644 dev-php/mod_php/files/digest-mod_php-4.4.0-r4 create mode 100644 dev-php/mod_php/files/digest-mod_php-4.4.0-r5 create mode 100644 dev-php/mod_php/files/php4.3.11-fopen_wrappers.patch create mode 100644 dev-php/mod_php/files/php4.3.11-gd_safe_mode.patch create mode 100644 dev-php/mod_php/files/php4.3.11-pspell-ext-segf.patch create mode 100644 dev-php/mod_php/files/php4.3.11-session_save_path-segf.patch create mode 100644 dev-php/mod_php/files/php4.4.0-fopen_wrappers.patch create mode 100644 dev-php/mod_php/files/php4.4.0-gd_safe_mode.patch create mode 100644 dev-php/mod_php/files/php4.4.0-pspell-ext-segf.patch create mode 100644 dev-php/mod_php/files/php4.4.0-session_save_path-segf.patch delete mode 100644 dev-php/mod_php/files/stdint.diff delete mode 100644 dev-php/mod_php/files/with-iodbc.diff create mode 100644 dev-php/mod_php/mod_php-4.3.11-r2.ebuild create mode 100644 dev-php/mod_php/mod_php-4.4.0-r4.ebuild create mode 100644 dev-php/mod_php/mod_php-4.4.0-r5.ebuild create mode 100644 dev-php/php-cgi/files/digest-php-cgi-4.3.11-r3 create mode 100644 dev-php/php-cgi/files/digest-php-cgi-4.4.0-r3 create mode 100644 dev-php/php-cgi/files/php4.3.11-fopen_wrappers.patch create mode 100644 dev-php/php-cgi/files/php4.3.11-gd_safe_mode.patch create mode 100644 dev-php/php-cgi/files/php4.3.11-pspell-ext-segf.patch create mode 100644 dev-php/php-cgi/files/php4.3.11-session_save_path-segf.patch create mode 100644 dev-php/php-cgi/files/php4.4.0-fopen_wrappers.patch create mode 100644 dev-php/php-cgi/files/php4.4.0-gd_safe_mode.patch create mode 100644 dev-php/php-cgi/files/php4.4.0-pspell-ext-segf.patch create mode 100644 dev-php/php-cgi/files/php4.4.0-session_save_path-segf.patch delete mode 100644 dev-php/php-cgi/files/stdint.diff create mode 100644 dev-php/php-cgi/php-cgi-4.3.11-r3.ebuild create mode 100644 dev-php/php-cgi/php-cgi-4.4.0-r3.ebuild create mode 100644 dev-php/php/files/digest-php-4.3.11-r2 create mode 100644 dev-php/php/files/digest-php-4.4.0-r2 delete mode 100644 dev-php/php/files/libmbfl-headers.patch create mode 100644 dev-php/php/files/php4.3.11-fopen_wrappers.patch create mode 100644 dev-php/php/files/php4.3.11-gd_safe_mode.patch create mode 100644 dev-php/php/files/php4.3.11-pspell-ext-segf.patch create mode 100644 dev-php/php/files/php4.3.11-session_save_path-segf.patch create mode 100644 dev-php/php/files/php4.4.0-fopen_wrappers.patch create mode 100644 dev-php/php/files/php4.4.0-gd_safe_mode.patch create mode 100644 dev-php/php/files/php4.4.0-pspell-ext-segf.patch create mode 100644 dev-php/php/files/php4.4.0-session_save_path-segf.patch delete mode 100644 dev-php/php/files/stdint.diff create mode 100644 dev-php/php/php-4.3.11-r2.ebuild create mode 100644 dev-php/php/php-4.4.0-r2.ebuild (limited to 'dev-php') diff --git a/dev-php/mod_php/ChangeLog b/dev-php/mod_php/ChangeLog index fd9f026e89c6..2afd96717a94 100644 --- a/dev-php/mod_php/ChangeLog +++ b/dev-php/mod_php/ChangeLog @@ -1,6 +1,24 @@ # ChangeLog for dev-php/mod_php # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/ChangeLog,v 1.278 2005/10/07 18:28:27 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/ChangeLog,v 1.279 2005/10/29 22:16:12 chtekk Exp $ + +*mod_php-4.4.0-r5 (29 Oct 2005) +*mod_php-4.4.0-r4 (29 Oct 2005) + + 29 Oct 2005; Luca Longinotti + +files/php4.3.11-fopen_wrappers.patch, + +files/php4.3.11-gd_safe_mode.patch, + +files/php4.3.11-pspell-ext-segf.patch, + +files/php4.3.11-session_save_path-segf.patch, + +files/php4.4.0-fopen_wrappers.patch, +files/php4.4.0-gd_safe_mode.patch, + +files/php4.4.0-pspell-ext-segf.patch, + +files/php4.4.0-session_save_path-segf.patch, -files/stdint.diff, + -files/with-iodbc.diff, mod_php-4.3.11.ebuild, mod_php-4.3.11-r1.ebuild, + +mod_php-4.3.11-r2.ebuild, mod_php-4.4.0.ebuild, mod_php-4.4.0-r1.ebuild, + mod_php-4.4.0-r2.ebuild, mod_php-4.4.0-r3.ebuild, + +mod_php-4.4.0-r4.ebuild, +mod_php-4.4.0-r5.ebuild: + Old-style PHP update: change URI of a mirror, remove two unused patches and + fix bugs #99312, #109669, #102943, #107602, #109482. 07 Oct 2005; Gustavo Zacarias mod_php-4.4.0-r3.ebuild: diff --git a/dev-php/mod_php/Manifest b/dev-php/mod_php/Manifest index 8231f01f25d5..a78644a1a261 100644 --- a/dev-php/mod_php/Manifest +++ b/dev-php/mod_php/Manifest @@ -1,40 +1,42 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 51eb4b29302b5123fdbc0902b2883929 ChangeLog 48175 +MD5 92ad4f0e9cb25cb5fc26a6d6fb6e3913 ChangeLog 49038 MD5 158cb07377a3e2a0028947b0aeb505cb files/4.3.10-r1/70_mod_php.conf 1017 MD5 2dfe55aa49dbca0c3316e859f8bebcb1 files/4.3.11-r2/70_mod_php.conf 1125 MD5 389638f1d46b6c41cd4d87b471572f4b files/4.4.0-a1/70_mod_php.conf 484 MD5 ee36e31632adb08b7abf70f78b5b2125 files/4.4.0-a2/70_mod_php.conf 485 MD5 79ed63479c494aeb2ed0bc7f5c059fb9 files/70_mod_php.conf 1022 -MD5 225b57325cbdf582288a8796da9d72f5 files/digest-mod_php-4.3.11 287 -MD5 ce1f1b2a1e56cf4459b2cbfdcce6b03f files/digest-mod_php-4.3.11-r1 364 -MD5 9b7f8c71395e9ac97dc87a48c9e4770d files/digest-mod_php-4.4.0 285 -MD5 9b7f8c71395e9ac97dc87a48c9e4770d files/digest-mod_php-4.4.0-r1 285 -MD5 61c52577ff879166da224373e27ad11e files/digest-mod_php-4.4.0-r2 362 -MD5 61c52577ff879166da224373e27ad11e files/digest-mod_php-4.4.0-r3 362 +MD5 cc21a816357d93a1d31cd44f861183c7 files/digest-mod_php-4.3.11 287 +MD5 05df4c881b1833626d9a75a08a0098fd files/digest-mod_php-4.3.11-r1 364 +MD5 05df4c881b1833626d9a75a08a0098fd files/digest-mod_php-4.3.11-r2 364 +MD5 09d7dee078c684b0de0e4de6209ef634 files/digest-mod_php-4.4.0 285 +MD5 09d7dee078c684b0de0e4de6209ef634 files/digest-mod_php-4.4.0-r1 285 +MD5 472ce8342d69fdad9d2a642b03b31bac files/digest-mod_php-4.4.0-r2 362 +MD5 472ce8342d69fdad9d2a642b03b31bac files/digest-mod_php-4.4.0-r3 362 +MD5 472ce8342d69fdad9d2a642b03b31bac files/digest-mod_php-4.4.0-r4 362 +MD5 472ce8342d69fdad9d2a642b03b31bac files/digest-mod_php-4.4.0-r5 362 MD5 7515e9b1dc298a0fb1c12d35a58c265d files/mod_php-4.3.4-amd64hack.diff 1028 MD5 3bf664b414787f8f3c1dcbda5750aef4 files/mod_php-4.3.5-apache1security.diff 425 MD5 cceddd5c262e0ffef31d45b7da269851 files/mod_php.conf 148 MD5 cdec3284251432935f950c2d15a405b7 files/php-4.3.11-flash.patch 694 MD5 b2aa5952d5c805b3e57a5a6bf0f0b8d0 files/php-4.3.11-gmp.patch 925 +MD5 cb36a386184ed6a887f62d2205f57173 files/php4.3.11-fopen_wrappers.patch 1481 +MD5 4db8e0b66cde22dd4e4d9f51e59f6098 files/php4.3.11-gd_safe_mode.patch 1573 MD5 47a031979331eeb527d0918d2c38cdbe files/php4.3.11-imap-symlink.diff 1238 MD5 a9b932952f12aa01a9f98a7fcbf32ed9 files/php4.3.11-pcre-security.patch 6031 +MD5 48d9c939434e9b01d0696410d59c503c files/php4.3.11-pspell-ext-segf.patch 8482 +MD5 17b906361a7ab8a3008446871623eeae files/php4.3.11-session_save_path-segf.patch 4938 +MD5 cb36a386184ed6a887f62d2205f57173 files/php4.4.0-fopen_wrappers.patch 1481 +MD5 a540c54ba22dc16b157edcf1ecb6258f files/php4.4.0-gd_safe_mode.patch 883 MD5 4c86d8ed96f2bb38b94e826c1f028c80 files/php4.4.0-imap-symlink.diff 1238 MD5 54a4ad0766f89185d7de2c6d07b07296 files/php4.4.0-pcre-security.patch 6177 -MD5 ad986b02a371b2fea3b4ae5060c9dc81 files/stdint.diff 358 -MD5 07529a6c32d73282c53d2936ed8ea9bd files/with-iodbc.diff 444 +MD5 48d9c939434e9b01d0696410d59c503c files/php4.4.0-pspell-ext-segf.patch 8482 +MD5 83fb9efb602c178741ea2e40e13b014f files/php4.4.0-session_save_path-segf.patch 4132 MD5 38fe937e954ab7109395cefa86fcd2d4 metadata.xml 384 -MD5 3e54c657a1b15632c17b7d2eea9f322a mod_php-4.3.11-r1.ebuild 7159 -MD5 56190a6344d0e907c007b55af5d4fca0 mod_php-4.3.11.ebuild 6423 -MD5 a3e29df002dbde1d18ab31334ed266ef mod_php-4.4.0-r1.ebuild 6597 -MD5 8d6457890ecaf1bd91d1e79982fb4b5d mod_php-4.4.0-r2.ebuild 7106 -MD5 b968549226d52af5b139ea9c50975888 mod_php-4.4.0-r3.ebuild 6141 -MD5 dacd61e1bba6292b852a354a22be284a mod_php-4.4.0.ebuild 6372 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2 (GNU/Linux) - -iD8DBQFDSLy3gIKl8Uu19MoRAqisAJ4ghe124FPorkQlTLx+UJrRcRnolgCeOeIE -c0B63yd4DhHd/tCHU8H6tBY= -=LqsW ------END PGP SIGNATURE----- +MD5 cc6f2b509133195fe0aa7a0e6f759562 mod_php-4.3.11-r1.ebuild 7129 +MD5 0a9568cdaabea12f7b5c6e8b3210b4b6 mod_php-4.3.11-r2.ebuild 7700 +MD5 2db6ca933590b87c097d879ec7b5e62c mod_php-4.3.11.ebuild 6389 +MD5 5ec0c1f3897e689af1e99d8ab5ca1cde mod_php-4.4.0-r1.ebuild 6563 +MD5 899fcc62ec13a7570941262f274d949c mod_php-4.4.0-r2.ebuild 7076 +MD5 dd0c8f0ce6625504a2e8c978218c29c6 mod_php-4.4.0-r3.ebuild 6145 +MD5 c680e379cd8fdc3a0f5d5be692ce35b7 mod_php-4.4.0-r4.ebuild 7643 +MD5 1a401e9640895970a588a113e8ea01d3 mod_php-4.4.0-r5.ebuild 6715 +MD5 db0f9f6efd84473eac3964342a34e285 mod_php-4.4.0.ebuild 6338 diff --git a/dev-php/mod_php/files/digest-mod_php-4.3.11 b/dev-php/mod_php/files/digest-mod_php-4.3.11 index 56f35b38ea94..46b217bb8db5 100644 --- a/dev-php/mod_php/files/digest-mod_php-4.3.11 +++ b/dev-php/mod_php/files/digest-mod_php-4.3.11 @@ -1,4 +1,4 @@ +MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613 MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575 MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 -MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613 diff --git a/dev-php/mod_php/files/digest-mod_php-4.3.11-r1 b/dev-php/mod_php/files/digest-mod_php-4.3.11-r1 index 30454e60ba23..8a51d50e2303 100644 --- a/dev-php/mod_php/files/digest-mod_php-4.3.11-r1 +++ b/dev-php/mod_php/files/digest-mod_php-4.3.11-r1 @@ -1,5 +1,5 @@ +MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613 MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575 MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 -MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613 MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-php/mod_php/files/digest-mod_php-4.3.11-r2 b/dev-php/mod_php/files/digest-mod_php-4.3.11-r2 new file mode 100644 index 000000000000..8a51d50e2303 --- /dev/null +++ b/dev-php/mod_php/files/digest-mod_php-4.3.11-r2 @@ -0,0 +1,5 @@ +MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613 +MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575 +MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 +MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 +MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-php/mod_php/files/digest-mod_php-4.4.0 b/dev-php/mod_php/files/digest-mod_php-4.4.0 index fe5e22bcebde..8f3ade5dd226 100644 --- a/dev-php/mod_php/files/digest-mod_php-4.4.0 +++ b/dev-php/mod_php/files/digest-mod_php-4.4.0 @@ -1,4 +1,4 @@ -MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 +MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 -MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 +MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 diff --git a/dev-php/mod_php/files/digest-mod_php-4.4.0-r1 b/dev-php/mod_php/files/digest-mod_php-4.4.0-r1 index fe5e22bcebde..8f3ade5dd226 100644 --- a/dev-php/mod_php/files/digest-mod_php-4.4.0-r1 +++ b/dev-php/mod_php/files/digest-mod_php-4.4.0-r1 @@ -1,4 +1,4 @@ -MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 +MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 -MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 +MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 diff --git a/dev-php/mod_php/files/digest-mod_php-4.4.0-r2 b/dev-php/mod_php/files/digest-mod_php-4.4.0-r2 index ef16f21dfdd3..dfbd3919a8b5 100644 --- a/dev-php/mod_php/files/digest-mod_php-4.4.0-r2 +++ b/dev-php/mod_php/files/digest-mod_php-4.4.0-r2 @@ -1,5 +1,5 @@ -MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 +MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 -MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 +MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-php/mod_php/files/digest-mod_php-4.4.0-r3 b/dev-php/mod_php/files/digest-mod_php-4.4.0-r3 index ef16f21dfdd3..dfbd3919a8b5 100644 --- a/dev-php/mod_php/files/digest-mod_php-4.4.0-r3 +++ b/dev-php/mod_php/files/digest-mod_php-4.4.0-r3 @@ -1,5 +1,5 @@ -MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 +MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 -MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 +MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-php/mod_php/files/digest-mod_php-4.4.0-r4 b/dev-php/mod_php/files/digest-mod_php-4.4.0-r4 new file mode 100644 index 000000000000..dfbd3919a8b5 --- /dev/null +++ b/dev-php/mod_php/files/digest-mod_php-4.4.0-r4 @@ -0,0 +1,5 @@ +MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 +MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 +MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 +MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 +MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-php/mod_php/files/digest-mod_php-4.4.0-r5 b/dev-php/mod_php/files/digest-mod_php-4.4.0-r5 new file mode 100644 index 000000000000..dfbd3919a8b5 --- /dev/null +++ b/dev-php/mod_php/files/digest-mod_php-4.4.0-r5 @@ -0,0 +1,5 @@ +MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 +MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 +MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 +MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 +MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-php/mod_php/files/php4.3.11-fopen_wrappers.patch b/dev-php/mod_php/files/php4.3.11-fopen_wrappers.patch new file mode 100644 index 000000000000..672da5ece63b --- /dev/null +++ b/dev-php/mod_php/files/php4.3.11-fopen_wrappers.patch @@ -0,0 +1,46 @@ +--- main/fopen_wrappers.c 2005/02/02 23:44:07 1.153.2.10 ++++ main/fopen_wrappers.c 2005/09/27 15:08:43 1.153.2.10.2.2 +@@ -16,7 +16,7 @@ + | Jim Winstead | + +----------------------------------------------------------------------+ + */ +-/* $Id: fopen_wrappers.c,v 1.153.2.10 2005/02/02 23:44:07 iliaa Exp $ */ ++/* $Id: fopen_wrappers.c,v 1.153.2.10.2.2 2005/09/27 15:08:43 iliaa Exp $ */ + + /* {{{ includes + */ +@@ -36,14 +36,6 @@ + #include + #define O_RDONLY _O_RDONLY + #include "win32/param.h" +-#elif defined(NETWARE) +-/*#include */ +-/*#include */ +-#ifdef NEW_LIBC +-#include +-#else +-#include "netware/param.h" +-#endif + #else + #include + #endif +@@ -57,8 +49,6 @@ + #if HAVE_PWD_H + #ifdef PHP_WIN32 + #include "win32/pwd.h" +-#elif defined(NETWARE) +-#include "netware/pwd.h" + #else + #include + #endif +@@ -120,8 +110,8 @@ PHPAPI int php_check_specific_open_based + /* Handler for basedirs that end with a / */ + resolved_basedir_len = strlen(resolved_basedir); + if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) { +- if (resolved_basedir[resolved_basedir_len - 1] == '/') { +- resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR; ++ if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { ++ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; + resolved_basedir[++resolved_basedir_len] = '\0'; + } + } diff --git a/dev-php/mod_php/files/php4.3.11-gd_safe_mode.patch b/dev-php/mod_php/files/php4.3.11-gd_safe_mode.patch new file mode 100644 index 000000000000..19011120eea2 --- /dev/null +++ b/dev-php/mod_php/files/php4.3.11-gd_safe_mode.patch @@ -0,0 +1,39 @@ +--- ext/gd/gd.c 2005/01/17 17:07:57 1.221.2.54 ++++ ext/gd/gd.c 2005/10/06 20:44:52 1.221.2.56.2.1 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: gd.c,v 1.221.2.54 2005/01/17 17:07:57 sniper Exp $ */ ++/* $Id: gd.c,v 1.221.2.56.2.1 2005/10/06 20:44:52 iliaa Exp $ */ + + /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, + Cold Spring Harbor Labs. */ +@@ -1644,7 +1644,7 @@ static void _php_image_output(INTERNAL_F + } + + if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { +- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { ++ if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); + RETURN_FALSE; + } +@@ -1699,7 +1699,7 @@ static void _php_image_output(INTERNAL_F + char buf[4096]; + char *path; + +- tmp = php_open_temporary_file("", "", &path TSRMLS_CC); ++ tmp = php_open_temporary_file(NULL, NULL, &path TSRMLS_CC); + if (tmp == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open temporary file"); + RETURN_FALSE; +@@ -3017,7 +3017,8 @@ static void php_imagettftext_common(INTE + { + zval *IM, *EXT = NULL; + gdImagePtr im=NULL; +- int col = -1, x = -1, y = -1, str_len, fontname_len, i, brect[8]; ++ long col = -1, x = -1, y = -1; ++ int str_len, fontname_len, i, brect[8]; + double ptsize, angle; + unsigned char *str = NULL, *fontname = NULL; + char *error = NULL; diff --git a/dev-php/mod_php/files/php4.3.11-pspell-ext-segf.patch b/dev-php/mod_php/files/php4.3.11-pspell-ext-segf.patch new file mode 100644 index 000000000000..a62c42fec553 --- /dev/null +++ b/dev-php/mod_php/files/php4.3.11-pspell-ext-segf.patch @@ -0,0 +1,317 @@ +--- ext/pspell/pspell.c 2003-08-28 22:01:29.000000000 +0200 ++++ ext/pspell/pspell.c 2005-10-26 23:24:22.000000000 +0200 +@@ -16,7 +16,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: pspell.c,v 1.28.8.5 2003/08/28 20:01:29 iliaa Exp $ */ ++/* $Id: pspell.c,v 1.28.8.5.4.2 2005/10/17 15:43:10 iliaa Exp $ */ + + #define IS_EXT_MODULE + +@@ -99,6 +99,22 @@ + delete_pspell_config(config); + } + ++#define PSPELL_FETCH_CONFIG \ ++ convert_to_long_ex(conf); \ ++ config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); \ ++ if (config == NULL || type != le_pspell_config) { \ ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); \ ++ RETURN_FALSE; \ ++ } \ ++ ++#define PSPELL_FETCH_MANAGER \ ++ convert_to_long_ex(scin); \ ++ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); \ ++ if (!manager || type != le_pspell) { \ ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); \ ++ RETURN_FALSE; \ ++ } \ ++ + /* {{{ PHP_MINIT_FUNCTION + */ + PHP_MINIT_FUNCTION(pspell) +@@ -350,14 +366,8 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(conf); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); ++ PSPELL_FETCH_CONFIG; + +- if (config == NULL || type != le_pspell_config) { +- php_error(E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); +- RETURN_FALSE; +- } +- + ret = new_pspell_manager(config); + + if(pspell_error_number(ret) != 0){ +@@ -385,13 +395,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + if(pspell_manager_check(manager, Z_STRVAL_PP(word))){ + RETURN_TRUE; +@@ -417,13 +423,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + array_init(return_value); + +@@ -455,14 +457,10 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(miss); + convert_to_string_ex(corr); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr)); + if(pspell_manager_error_number(manager) == 0){ +@@ -488,13 +486,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ + if(Z_STRLEN_PP(word) == 0){ +@@ -525,13 +519,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ + if(Z_STRLEN_PP(word) == 0){ +@@ -562,12 +552,7 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_MANAGER; + + pspell_manager_clear_session(manager); + if(pspell_manager_error_number(manager) == 0){ +@@ -593,12 +578,7 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_MANAGER; + + pspell_manager_save_all_word_lists(manager); + +@@ -666,22 +646,17 @@ + PHP_FUNCTION(pspell_config_runtogether) + { + int type; +- zval **sccin, **runtogether; ++ zval **conf, **runtogether; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_boolean_ex(runtogether); + pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false"); +@@ -695,22 +670,17 @@ + PHP_FUNCTION(pspell_config_mode) + { + int type; +- zval **sccin, **mode; ++ zval **conf, **mode; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_long_ex(mode); + +@@ -732,7 +702,7 @@ + PHP_FUNCTION(pspell_config_ignore) + { + int type; +- zval **sccin, **pignore; ++ zval **conf, **pignore; + int argc; + + int loc = PSPELL_LARGEST_WORD; +@@ -742,16 +712,11 @@ + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_long_ex(pignore); + ignore = Z_LVAL_PP(pignore); +@@ -782,22 +747,17 @@ + PHP_FUNCTION(pspell_config_personal) + { + int type; +- zval **sccin, **personal; ++ zval **conf, **personal; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&personal) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&personal) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_string_ex(personal); + +@@ -820,22 +780,17 @@ + PHP_FUNCTION(pspell_config_repl) + { + int type; +- zval **sccin, **repl; ++ zval **conf, **repl; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + pspell_config_replace(config, "save-repl", "true"); + +@@ -860,22 +815,17 @@ + PHP_FUNCTION(pspell_config_save_repl) + { + int type; +- zval **sccin, **save; ++ zval **conf, **save; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_boolean_ex(save); + pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false"); diff --git a/dev-php/mod_php/files/php4.3.11-session_save_path-segf.patch b/dev-php/mod_php/files/php4.3.11-session_save_path-segf.patch new file mode 100644 index 000000000000..3836776b14b4 --- /dev/null +++ b/dev-php/mod_php/files/php4.3.11-session_save_path-segf.patch @@ -0,0 +1,154 @@ +--- sapi/apache2handler/sapi_apache2.c 2005-03-10 12:39:04.000000000 +0100 ++++ sapi/apache2handler/sapi_apache2.c 2005-10-26 16:02:03.000000000 +0200 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: sapi_apache2.c,v 1.1.2.39 2005/03/10 11:39:04 jorton Exp $ */ ++/* $Id: sapi_apache2.c,v 1.1.2.40.2.5 2005/10/12 21:41:36 tony2001 Exp $ */ + + #include + +@@ -268,23 +268,18 @@ + TSRMLS_FETCH(); + + ctx = SG(server_context); +- +- /* We use APLOG_STARTUP because it keeps us from printing the +- * data and time information at the beginning of the error log +- * line. Not sure if this is correct, but it mirrors what happens +- * with Apache 1.3 -- rbb +- */ ++ + if (ctx == NULL) { /* we haven't initialized our ctx yet, oh well */ + ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, NULL, "%s", msg); + } else { +- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, ctx->r, "%s", msg); ++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, "%s", msg); + } + } + + static void php_apache_sapi_log_message_ex(char *msg, request_rec *r) + { + if (r) { +- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, r, msg, r->filename); ++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, msg, r->filename); + } else { + php_apache_sapi_log_message(msg); + } +@@ -458,15 +453,34 @@ + request_rec *parent_req = NULL; + TSRMLS_FETCH(); + ++#define PHPAP_INI_OFF \ ++ if (strcmp(r->protocol, "INCLUDED")) { \ ++ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \ ++ } \ ++ + conf = ap_get_module_config(r->per_dir_config, &php4_module); ++ ++ /* apply_config() needs r in some cases, so allocate server_context early */ ++ ctx = SG(server_context); ++ if (ctx == NULL) { ++ ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); ++ /* register a cleanup so we clear out the SG(server_context) ++ * after each request. Note: We pass in the pointer to the ++ * server_context in case this is handled by a different thread. ++ */ ++ apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); ++ ctx->r = r; ++ ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */ ++ } else { ++ parent_req = ctx->r; ++ ctx->r = r; ++ } + apply_config(conf); + + if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) { + /* Check for xbithack in this case. */ + if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return DECLINED; + } + } +@@ -475,32 +489,24 @@ + * the configuration; default behaviour is to accept. */ + if (r->used_path_info == AP_REQ_REJECT_PATH_INFO + && r->path_info && r->path_info[0]) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_NOT_FOUND; + } + + /* handle situations where user turns the engine off */ + if (!AP2(engine)) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return DECLINED; + } + + if (r->finfo.filetype == 0) { + php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r); +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_NOT_FOUND; + } + if (r->finfo.filetype == APR_DIR) { + php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r); +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_FORBIDDEN; + } + +@@ -516,24 +522,30 @@ + + zend_first_try { + +- ctx = SG(server_context); + if (ctx == NULL) { +- ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); +- /* register a cleanup so we clear out the SG(server_context) +- * after each request. Note: We pass in the pointer to the +- * server_context in case this is handled by a different thread. +- */ +- apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); +- +- ctx->r = r; ++normal: + brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc); ++ ctx = SG(server_context); + ctx->brigade = brigade; + + if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { + zend_bailout(); + } + } else { +- parent_req = ctx->r; ++ if (!parent_req) { ++ parent_req = ctx->r; ++ } ++ if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) { ++ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { ++ zend_bailout(); ++ } ++ } ++ ++ /* check if comming due to ErrorDocument */ ++ if (parent_req && parent_req->status != HTTP_OK) { ++ parent_req = NULL; ++ goto normal; ++ } + ctx->r = r; + brigade = ctx->brigade; + } diff --git a/dev-php/mod_php/files/php4.4.0-fopen_wrappers.patch b/dev-php/mod_php/files/php4.4.0-fopen_wrappers.patch new file mode 100644 index 000000000000..672da5ece63b --- /dev/null +++ b/dev-php/mod_php/files/php4.4.0-fopen_wrappers.patch @@ -0,0 +1,46 @@ +--- main/fopen_wrappers.c 2005/02/02 23:44:07 1.153.2.10 ++++ main/fopen_wrappers.c 2005/09/27 15:08:43 1.153.2.10.2.2 +@@ -16,7 +16,7 @@ + | Jim Winstead | + +----------------------------------------------------------------------+ + */ +-/* $Id: fopen_wrappers.c,v 1.153.2.10 2005/02/02 23:44:07 iliaa Exp $ */ ++/* $Id: fopen_wrappers.c,v 1.153.2.10.2.2 2005/09/27 15:08:43 iliaa Exp $ */ + + /* {{{ includes + */ +@@ -36,14 +36,6 @@ + #include + #define O_RDONLY _O_RDONLY + #include "win32/param.h" +-#elif defined(NETWARE) +-/*#include */ +-/*#include */ +-#ifdef NEW_LIBC +-#include +-#else +-#include "netware/param.h" +-#endif + #else + #include + #endif +@@ -57,8 +49,6 @@ + #if HAVE_PWD_H + #ifdef PHP_WIN32 + #include "win32/pwd.h" +-#elif defined(NETWARE) +-#include "netware/pwd.h" + #else + #include + #endif +@@ -120,8 +110,8 @@ PHPAPI int php_check_specific_open_based + /* Handler for basedirs that end with a / */ + resolved_basedir_len = strlen(resolved_basedir); + if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) { +- if (resolved_basedir[resolved_basedir_len - 1] == '/') { +- resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR; ++ if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { ++ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; + resolved_basedir[++resolved_basedir_len] = '\0'; + } + } diff --git a/dev-php/mod_php/files/php4.4.0-gd_safe_mode.patch b/dev-php/mod_php/files/php4.4.0-gd_safe_mode.patch new file mode 100644 index 000000000000..1e0d49d1373c --- /dev/null +++ b/dev-php/mod_php/files/php4.4.0-gd_safe_mode.patch @@ -0,0 +1,20 @@ +--- ext/gd/gd.c 2005/05/06 16:51:54 1.221.2.56 ++++ ext/gd/gd.c 2005/10/06 20:44:52 1.221.2.56.2.1 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: gd.c,v 1.221.2.56 2005/05/06 16:51:54 tony2001 Exp $ */ ++/* $Id: gd.c,v 1.221.2.56.2.1 2005/10/06 20:44:52 iliaa Exp $ */ + + /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, + Cold Spring Harbor Labs. */ +@@ -1644,7 +1644,7 @@ static void _php_image_output(INTERNAL_F + } + + if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { +- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { ++ if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); + RETURN_FALSE; + } diff --git a/dev-php/mod_php/files/php4.4.0-pspell-ext-segf.patch b/dev-php/mod_php/files/php4.4.0-pspell-ext-segf.patch new file mode 100644 index 000000000000..a62c42fec553 --- /dev/null +++ b/dev-php/mod_php/files/php4.4.0-pspell-ext-segf.patch @@ -0,0 +1,317 @@ +--- ext/pspell/pspell.c 2003-08-28 22:01:29.000000000 +0200 ++++ ext/pspell/pspell.c 2005-10-26 23:24:22.000000000 +0200 +@@ -16,7 +16,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: pspell.c,v 1.28.8.5 2003/08/28 20:01:29 iliaa Exp $ */ ++/* $Id: pspell.c,v 1.28.8.5.4.2 2005/10/17 15:43:10 iliaa Exp $ */ + + #define IS_EXT_MODULE + +@@ -99,6 +99,22 @@ + delete_pspell_config(config); + } + ++#define PSPELL_FETCH_CONFIG \ ++ convert_to_long_ex(conf); \ ++ config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); \ ++ if (config == NULL || type != le_pspell_config) { \ ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); \ ++ RETURN_FALSE; \ ++ } \ ++ ++#define PSPELL_FETCH_MANAGER \ ++ convert_to_long_ex(scin); \ ++ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); \ ++ if (!manager || type != le_pspell) { \ ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); \ ++ RETURN_FALSE; \ ++ } \ ++ + /* {{{ PHP_MINIT_FUNCTION + */ + PHP_MINIT_FUNCTION(pspell) +@@ -350,14 +366,8 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(conf); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); ++ PSPELL_FETCH_CONFIG; + +- if (config == NULL || type != le_pspell_config) { +- php_error(E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); +- RETURN_FALSE; +- } +- + ret = new_pspell_manager(config); + + if(pspell_error_number(ret) != 0){ +@@ -385,13 +395,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + if(pspell_manager_check(manager, Z_STRVAL_PP(word))){ + RETURN_TRUE; +@@ -417,13 +423,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + array_init(return_value); + +@@ -455,14 +457,10 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(miss); + convert_to_string_ex(corr); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr)); + if(pspell_manager_error_number(manager) == 0){ +@@ -488,13 +486,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ + if(Z_STRLEN_PP(word) == 0){ +@@ -525,13 +519,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ + if(Z_STRLEN_PP(word) == 0){ +@@ -562,12 +552,7 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_MANAGER; + + pspell_manager_clear_session(manager); + if(pspell_manager_error_number(manager) == 0){ +@@ -593,12 +578,7 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_MANAGER; + + pspell_manager_save_all_word_lists(manager); + +@@ -666,22 +646,17 @@ + PHP_FUNCTION(pspell_config_runtogether) + { + int type; +- zval **sccin, **runtogether; ++ zval **conf, **runtogether; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_boolean_ex(runtogether); + pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false"); +@@ -695,22 +670,17 @@ + PHP_FUNCTION(pspell_config_mode) + { + int type; +- zval **sccin, **mode; ++ zval **conf, **mode; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_long_ex(mode); + +@@ -732,7 +702,7 @@ + PHP_FUNCTION(pspell_config_ignore) + { + int type; +- zval **sccin, **pignore; ++ zval **conf, **pignore; + int argc; + + int loc = PSPELL_LARGEST_WORD; +@@ -742,16 +712,11 @@ + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_long_ex(pignore); + ignore = Z_LVAL_PP(pignore); +@@ -782,22 +747,17 @@ + PHP_FUNCTION(pspell_config_personal) + { + int type; +- zval **sccin, **personal; ++ zval **conf, **personal; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&personal) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&personal) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_string_ex(personal); + +@@ -820,22 +780,17 @@ + PHP_FUNCTION(pspell_config_repl) + { + int type; +- zval **sccin, **repl; ++ zval **conf, **repl; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + pspell_config_replace(config, "save-repl", "true"); + +@@ -860,22 +815,17 @@ + PHP_FUNCTION(pspell_config_save_repl) + { + int type; +- zval **sccin, **save; ++ zval **conf, **save; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_boolean_ex(save); + pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false"); diff --git a/dev-php/mod_php/files/php4.4.0-session_save_path-segf.patch b/dev-php/mod_php/files/php4.4.0-session_save_path-segf.patch new file mode 100644 index 000000000000..8f936ae5ec39 --- /dev/null +++ b/dev-php/mod_php/files/php4.4.0-session_save_path-segf.patch @@ -0,0 +1,127 @@ +--- sapi/apache2handler/sapi_apache2.c 2005/04/08 20:35:02 1.1.2.40 ++++ sapi/apache2handler/sapi_apache2.c 2005/10/12 21:41:36 1.1.2.40.2.5 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: sapi_apache2.c,v 1.1.2.40 2005/04/08 20:35:02 sniper Exp $ */ ++/* $Id: sapi_apache2.c,v 1.1.2.40.2.5 2005/10/12 21:41:36 tony2001 Exp $ */ + + #include + +@@ -453,15 +453,34 @@ static int php_handler(request_rec *r) + request_rec *parent_req = NULL; + TSRMLS_FETCH(); + ++#define PHPAP_INI_OFF \ ++ if (strcmp(r->protocol, "INCLUDED")) { \ ++ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \ ++ } \ ++ + conf = ap_get_module_config(r->per_dir_config, &php4_module); ++ ++ /* apply_config() needs r in some cases, so allocate server_context early */ ++ ctx = SG(server_context); ++ if (ctx == NULL) { ++ ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); ++ /* register a cleanup so we clear out the SG(server_context) ++ * after each request. Note: We pass in the pointer to the ++ * server_context in case this is handled by a different thread. ++ */ ++ apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); ++ ctx->r = r; ++ ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */ ++ } else { ++ parent_req = ctx->r; ++ ctx->r = r; ++ } + apply_config(conf); + + if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) { + /* Check for xbithack in this case. */ + if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return DECLINED; + } + } +@@ -470,32 +489,24 @@ static int php_handler(request_rec *r) + * the configuration; default behaviour is to accept. */ + if (r->used_path_info == AP_REQ_REJECT_PATH_INFO + && r->path_info && r->path_info[0]) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_NOT_FOUND; + } + + /* handle situations where user turns the engine off */ + if (!AP2(engine)) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return DECLINED; + } + + if (r->finfo.filetype == 0) { + php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r); +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_NOT_FOUND; + } + if (r->finfo.filetype == APR_DIR) { + php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r); +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_FORBIDDEN; + } + +@@ -511,24 +522,30 @@ static int php_handler(request_rec *r) + + zend_first_try { + +- ctx = SG(server_context); + if (ctx == NULL) { +- ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); +- /* register a cleanup so we clear out the SG(server_context) +- * after each request. Note: We pass in the pointer to the +- * server_context in case this is handled by a different thread. +- */ +- apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); +- +- ctx->r = r; ++normal: + brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc); ++ ctx = SG(server_context); + ctx->brigade = brigade; + + if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { + zend_bailout(); + } + } else { +- parent_req = ctx->r; ++ if (!parent_req) { ++ parent_req = ctx->r; ++ } ++ if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) { ++ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { ++ zend_bailout(); ++ } ++ } ++ ++ /* check if comming due to ErrorDocument */ ++ if (parent_req && parent_req->status != HTTP_OK) { ++ parent_req = NULL; ++ goto normal; ++ } + ctx->r = r; + brigade = ctx->brigade; + } diff --git a/dev-php/mod_php/files/stdint.diff b/dev-php/mod_php/files/stdint.diff deleted file mode 100644 index 451d7fb44cf3..000000000000 --- a/dev-php/mod_php/files/stdint.diff +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nura php-4.3.10/Zend/zend_strtod.c php-4.3.10.stdint/Zend/zend_strtod.c ---- php-4.3.10/Zend/zend_strtod.c 2004-12-14 05:35:26.000000000 -0300 -+++ php-4.3.10.stdint/Zend/zend_strtod.c 2004-12-16 15:33:47.000000000 -0300 -@@ -128,6 +128,7 @@ - #endif - - #if defined(__sparc__) || defined(__ppc__) -+#include - #define u_int32_t uint32_t - #endif - diff --git a/dev-php/mod_php/files/with-iodbc.diff b/dev-php/mod_php/files/with-iodbc.diff deleted file mode 100644 index 5bf1fc3131e2..000000000000 --- a/dev-php/mod_php/files/with-iodbc.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- ext/odbc/php_odbc_includes.h~ 2005-02-22 17:55:18.000000000 +0000 -+++ ext/odbc/php_odbc_includes.h 2005-02-22 17:55:26.000000000 +0000 -@@ -91,8 +91,8 @@ - #elif defined(HAVE_IODBC) /* iODBC library */ - - #define ODBC_TYPE "iODBC" --#include --#include -+#include -+#include - #define HAVE_SQL_EXTENDED_FETCH 1 - #define SQL_FD_FETCH_ABSOLUTE 0x00000010L - #define SQL_CURSOR_DYNAMIC 2UL diff --git a/dev-php/mod_php/mod_php-4.3.11-r1.ebuild b/dev-php/mod_php/mod_php-4.3.11-r1.ebuild index b785db41d5fb..535ddbcd27c2 100644 --- a/dev-php/mod_php/mod_php-4.3.11-r1.ebuild +++ b/dev-php/mod_php/mod_php-4.3.11-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.3.11-r1.ebuild,v 1.17 2005/10/01 09:15:46 ferringb Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.3.11-r1.ebuild,v 1.18 2005/10/29 22:16:12 chtekk Exp $ IUSE="apache2" @@ -71,7 +71,7 @@ PDEPEND=">=${PHP_PROVIDER_PKG}-4.3.11" PROVIDE="${PROVIDE} virtual/httpd-php" # fixed PCRE library for security issues, bug #102373 -SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" # Add a 'return 0' as we DON'T want the return code checked pkg_setup() { @@ -202,7 +202,7 @@ pkg_postinst() { apache2msg else einfo "1. Execute the command:" - einfo " \"ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config\"" + einfo " \"emerge --config =${PF}\"" einfo "2. Edit /etc/conf.d/apache and add \"-D PHP4\" to APACHE_OPTS" einfo "That will include the php mime types in your configuration" einfo "automagically and setup Apache to load php when it starts." diff --git a/dev-php/mod_php/mod_php-4.3.11-r2.ebuild b/dev-php/mod_php/mod_php-4.3.11-r2.ebuild new file mode 100644 index 000000000000..fa5d55b0b0ff --- /dev/null +++ b/dev-php/mod_php/mod_php-4.3.11-r2.ebuild @@ -0,0 +1,238 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.3.11-r2.ebuild,v 1.10 2005/10/29 22:16:12 chtekk Exp $ + +IUSE="apache2" + +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" + +detectapache() { + # DO NOT REPLICATE THIS IN ANY OTHER PACKAGE WITHOUT PORTAGE DEVS PERMISSION + # IT IS BROKEN AND A TEMPORARY MEASURE! + # YOU'VE BEEN WARNED. + if [[ ${EBUILD_PHASE/depend} != ${EBUILD_PHASE} ]]; then + APACHEVER=1 + return + fi + local domsg= + [ -n "$1" ] && domsg=1 + HAVE_APACHE1= + HAVE_APACHE2= + has_version '=net-www/apache-1*' && HAVE_APACHE1=1 + has_version '=net-www/apache-2*' && HAVE_APACHE2=1 + + [ -n "${HAVE_APACHE1}" ] && APACHEVER=1 + [ -n "${HAVE_APACHE2}" ] && APACHEVER=2 + [ -n "${HAVE_APACHE1}" ] && [ -n "${HAVE_APACHE2}" ] && APACHEVER='both' + + case "${APACHEVER}" in + 1) [ -n "${domsg}" ] && einfo 'Apache1 only detected' ;; + 2) [ -n "${domsg}" ] && einfo 'Apache2 only detected';; + both) + if use apache2; then + [ -n "${domsg}" ] && einfo "Multiple Apache versions detected, using Apache2 (USE=apache2)" + APACHEVER=2 + else + [ -n "${domsg}" ] && einfo 'Multiple Apache versions detected, using Apache1 (USE=-apache2)' + APACHEVER=1 + fi ;; + *) if [ -n "${domsg}" ]; then + MSG="Unknown Apache version!"; eerror $MSG ; die $MSG + else + APACHEVER=0 + fi; ;; + esac +} + +detectapache + +SLOT="${APACHEVER}" +[ "${APACHEVER}" -eq '2' ] && USE_APACHE2='2' || USE_APACHE2='' + +PHPSAPI="apache${APACHEVER}" +SRC_URI_BASE="http://downloads.php.net/ilia/" # for RC only + +# BIG FAT WARNING! +# the php eclass requires the PHPSAPI setting! +# In this case the PHPSAPI setting is dependant on the detectapache function +# above this point as well! +inherit php-sapi eutils + +DESCRIPTION="Apache module for PHP" + +DEPEND_EXTRA=">=net-www/apache-1.3.26-r2 + apache2? ( >=net-www/apache-2.0.43-r1 + !>=net-www/apache-2.0.54-r30 )" +DEPEND="${DEPEND} ${DEPEND_EXTRA}" +RDEPEND="${RDEPEND} ${DEPEND_EXTRA}" +IUSE="${IUSE} debug" +# for this revision only +PDEPEND=">=${PHP_PROVIDER_PKG}-4.3.11" +PROVIDE="${PROVIDE} virtual/httpd-php" + +# fixed PCRE library for security issues, bug #102373 +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" + +# Add a 'return 0' as we DON'T want the return code checked +pkg_setup() { + use debug && einfo "Installing in SLOT=${SLOT}" + return 0 +} + +src_unpack() { + multiinstwarn + detectapache domsg + php-sapi_src_unpack + if [ "${ARCH}" == "amd64" ] ; then + epatch ${FILESDIR}/mod_php-4.3.4-amd64hack.diff + fi + + # bug fix for security problem - bug #39952 + # second revision as the apache2 stuff was resolved upstream + epatch ${FILESDIR}/mod_php-4.3.5-apache1security.diff + + # Bug 88756 + use flash && epatch ${FILESDIR}/php-4.3.11-flash.patch + + # Bug 88795 + use gmp && epatch ${FILESDIR}/php-4.3.11-gmp.patch + + # stop php from activing the apache config, as we will do that ourselves + for i in configure sapi/apache/config.m4 sapi/apache2filter/config.m4 sapi/apache2handler/config.m4; do + sed -i.orig -e 's,-i -a -n php4,-i -n php4,g' $i + done + + # fix imap symlink creation, bug #105351 + use imap && epatch ${FILESDIR}/php4.3.11-imap-symlink.diff + + # patch to fix pspell extension, bug #99312 (new patch by upstream) + use spell && epatch "${FILESDIR}/php4.3.11-pspell-ext-segf.patch" + + # patch to fix safe_mode bypass in GD extension, bug #109669 + if use gd || use gd-external ; then + epatch "${FILESDIR}/php4.3.11-gd_safe_mode.patch" + fi + + # patch open_basedir directory bypass, bug #102943 + epatch "${FILESDIR}/php4.3.11-fopen_wrappers.patch" + + # patch to fix session.save_path segfault and other issues in + # the apache2handler SAPI, bug #107602 + epatch "${FILESDIR}/php4.3.11-session_save_path-segf.patch" + + # we need to unpack the files here, the eclass doesn't handle this + cd ${WORKDIR} + unpack php-pcrelib-new-secpatch.tar.bz2 + cd ${S} + + # patch to fix PCRE library security issues, bug #102373 + epatch ${FILESDIR}/php4.3.11-pcre-security.patch + + # sobstitute the bundled PCRE library with a fixed version for bug #102373 + einfo "Updating bundled PCRE library" + rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library" +} + +src_compile() { + # Every Apache2 MPM EXCEPT prefork needs Zend Thread Safety + if [ -n "${USE_APACHE2}" ]; then + APACHE2_MPM="`/usr/sbin/apache2 -l |egrep 'worker|perchild|leader|threadpool|prefork'|cut -d. -f1|sed -e 's/^[[:space:]]*//g;s/[[:space:]]+/ /g;'`" + einfo "Apache2 MPM: ${APACHE2_MPM}" + case "${APACHE2_MPM}" in + *prefork*) ;; + *) myconf="${myconf} --enable-experimental-zts" ; ewarn "Enabling ZTS for Apache2 MPM" ;; + esac; + fi + + #use apache2 \ + myconf="${myconf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" + + php-sapi_src_compile +} + + +src_install() { + PHP_INSTALLTARGETS="install" + php-sapi_src_install + einfo "Adding extra symlink to php.ini for Apache${USE_APACHE2}" + dodir /etc/apache${USE_APACHE2}/conf/ + dodir ${PHPINIDIRECTORY} + dosym ${PHPINIDIRECTORY}/${PHPINIFILENAME} /etc/apache${USE_APACHE2}/conf/${PHPINIFILENAME} + + einfo "Cleaning up a little" + rm -rf ${D}/usr/lib/apache${USE_APACHE2}/modules/libphp4.so + einfo "Adding extra symlink to Apache${USE_APACHE2} extramodules for PHP" + dosym /usr/lib/apache${USE_APACHE2}-extramodules ${PHPINIDIRECTORY}/lib + exeinto /usr/lib/apache${USE_APACHE2}-extramodules + einfo "Installing mod_php shared object now" + doexe .libs/libphp4.so + + if [ -n "${USE_APACHE2}" ] ; then + einfo "Installing a Apache2 config for PHP (70_mod_php.conf)" + insinto /etc/apache2/conf/modules.d + doins ${FILESDIR}/70_mod_php.conf + else + einfo "Installing a Apache config for PHP (mod_php.conf)" + insinto /etc/apache/conf/addon-modules + doins ${FILESDIR}/mod_php.conf + dosym ${PHPINIDIRECTORY}/${PHPINIFILENAME} /etc/apache/conf/addon-modules/${PHPINIFILENAME} + fi +} + +apache2msg() { + einfo "Edit /etc/conf.d/apache2 and add \"-D PHP4\" to APACHE2_OPTS" + ewarn "This is a CHANGE from previous behavior, which was \"-D PHP\"" + ewarn "This is for the upcoming PHP5 support. The ebuild will attempt" + ewarn "to make this update between PHP and PHP4 automatically" +} + +multiinstwarn() { + ewarn "Due to some previous bloopers with PHP and slotting, you may have" + ewarn "multiple instances of mod_php installed. Please look at the autoclean" + ewarn "output at the end of the emerge and unmerge all but relevant" + ewarn "instances." +} + +apache2fix() { + if egrep -q -- '-D PHP\>' /etc/conf.d/apache2; then + einfo "Attemping to update /etc/conf.d/apache2 automatically for the PHP/PHP4 change." + local oldfile="/etc/conf.d/apache2.old.`date +%Y%m%d%H%M%S`" + cp /etc/conf.d/apache2 ${oldfile} + sed -re 's,-D PHP\>,-D PHP4,g' ${oldfile} <${oldfile} >/etc/conf.d/apache2 + fi +} + + +pkg_preinst() { + multiinstwarn + [ "${APACHEVER}" -eq '2' ] && apache2fix + php-sapi_pkg_preinst +} + +pkg_postinst() { + php-sapi_pkg_postinst + multiinstwarn + einfo "To have Apache run php programs, please do the following:" + if [ -n "${USE_APACHE2}" ]; then + apache2msg + else + einfo "1. Execute the command:" + einfo " \"emerge --config =${PF}\"" + einfo "2. Edit /etc/conf.d/apache and add \"-D PHP4\" to APACHE_OPTS" + einfo "That will include the php mime types in your configuration" + einfo "automagically and setup Apache to load php when it starts." + fi +} + +pkg_config() { + multiinstwarn + if [ -n "${USE_APACHE2}" ]; then + apache2msg + else + ${ROOT}/usr/sbin/apacheaddmod \ + ${ROOT}/etc/apache/conf/apache.conf \ + extramodules/libphp4.so mod_php4.c php4_module \ + before=perl define=PHP4 addconf=conf/addon-modules/mod_php.conf + :; + fi +} diff --git a/dev-php/mod_php/mod_php-4.3.11.ebuild b/dev-php/mod_php/mod_php-4.3.11.ebuild index 1231b7d57dd9..e44da70ae88a 100644 --- a/dev-php/mod_php/mod_php-4.3.11.ebuild +++ b/dev-php/mod_php/mod_php-4.3.11.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.3.11.ebuild,v 1.19 2005/10/01 09:15:46 ferringb Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.3.11.ebuild,v 1.20 2005/10/29 22:16:12 chtekk Exp $ IUSE="apache2" @@ -184,7 +184,7 @@ pkg_postinst() { apache2msg else einfo "1. Execute the command:" - einfo " \"ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config\"" + einfo " \"emerge --config =${PF}\"" einfo "2. Edit /etc/conf.d/apache and add \"-D PHP4\" to APACHE_OPTS" einfo "That will include the php mime types in your configuration" einfo "automagically and setup Apache to load php when it starts." diff --git a/dev-php/mod_php/mod_php-4.4.0-r1.ebuild b/dev-php/mod_php/mod_php-4.4.0-r1.ebuild index da51e0fdcdc0..32329cacbc84 100644 --- a/dev-php/mod_php/mod_php-4.4.0-r1.ebuild +++ b/dev-php/mod_php/mod_php-4.4.0-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.4.0-r1.ebuild,v 1.8 2005/10/01 09:15:46 ferringb Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.4.0-r1.ebuild,v 1.9 2005/10/29 22:16:12 chtekk Exp $ IUSE="apache2" @@ -197,7 +197,7 @@ pkg_postinst() { apache2msg else einfo "1. Execute the command:" - einfo " \"ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config\"" + einfo " \"emerge --config =${PF}\"" einfo "2. Edit /etc/conf.d/apache and add \"-D PHP4\" to APACHE_OPTS" einfo "That will include the php mime types in your configuration" einfo "automagically and setup Apache to load php when it starts." diff --git a/dev-php/mod_php/mod_php-4.4.0-r2.ebuild b/dev-php/mod_php/mod_php-4.4.0-r2.ebuild index 0f90f43101e5..e78001b193cb 100644 --- a/dev-php/mod_php/mod_php-4.4.0-r2.ebuild +++ b/dev-php/mod_php/mod_php-4.4.0-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.4.0-r2.ebuild,v 1.7 2005/10/01 09:15:46 ferringb Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.4.0-r2.ebuild,v 1.8 2005/10/29 22:16:12 chtekk Exp $ IUSE="apache2" @@ -71,7 +71,7 @@ PDEPEND=">=${PHP_PROVIDER_PKG}-4.4.0" PROVIDE="${PROVIDE} virtual/httpd-php" # fixed PCRE library for security issues, bug #102373 -SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" # Add a 'return 0' as we DON'T want the return code checked pkg_setup() { @@ -199,7 +199,7 @@ pkg_postinst() { apache2msg else einfo "1. Execute the command:" - einfo " \"ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config\"" + einfo " \"emerge --config =${PF}\"" einfo "2. Edit /etc/conf.d/apache and add \"-D PHP4\" to APACHE_OPTS" einfo "That will include the php mime types in your configuration" einfo "automagically and setup Apache to load php when it starts." diff --git a/dev-php/mod_php/mod_php-4.4.0-r3.ebuild b/dev-php/mod_php/mod_php-4.4.0-r3.ebuild index a0f071c0f9cd..2394e92257ee 100644 --- a/dev-php/mod_php/mod_php-4.4.0-r3.ebuild +++ b/dev-php/mod_php/mod_php-4.4.0-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.4.0-r3.ebuild,v 1.12 2005/10/09 06:44:23 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.4.0-r3.ebuild,v 1.13 2005/10/29 22:16:12 chtekk Exp $ IUSE="apache2" @@ -70,7 +70,7 @@ PDEPEND=">=${PHP_PROVIDER_PKG}-4.4.0" PROVIDE="${PROVIDE} virtual/httpd-php" # fixed PCRE library for security issues, bug #102373 -SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" # generalize some apache{,2} vars (defined by apache-module.eclass) if [ -n ${USE_APACHE2} ]; then diff --git a/dev-php/mod_php/mod_php-4.4.0-r4.ebuild b/dev-php/mod_php/mod_php-4.4.0-r4.ebuild new file mode 100644 index 000000000000..90417295bea9 --- /dev/null +++ b/dev-php/mod_php/mod_php-4.4.0-r4.ebuild @@ -0,0 +1,235 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.4.0-r4.ebuild,v 1.1 2005/10/29 22:16:12 chtekk Exp $ + +IUSE="apache2" + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" + +detectapache() { + # DO NOT REPLICATE THIS IN ANY OTHER PACKAGE WITHOUT PORTAGE DEVS PERMISSION + # IT IS BROKEN AND A TEMPORARY MEASURE! + # YOU'VE BEEN WARNED. + if [[ ${EBUILD_PHASE/depend} != ${EBUILD_PHASE} ]]; then + APACHEVER=1 + return + fi + local domsg= + [ -n "$1" ] && domsg=1 + HAVE_APACHE1= + HAVE_APACHE2= + has_version '=net-www/apache-1*' && HAVE_APACHE1=1 + has_version '=net-www/apache-2*' && HAVE_APACHE2=1 + + [ -n "${HAVE_APACHE1}" ] && APACHEVER=1 + [ -n "${HAVE_APACHE2}" ] && APACHEVER=2 + [ -n "${HAVE_APACHE1}" ] && [ -n "${HAVE_APACHE2}" ] && APACHEVER='both' + + case "${APACHEVER}" in + 1) [ -n "${domsg}" ] && einfo 'Apache1 only detected' ;; + 2) [ -n "${domsg}" ] && einfo 'Apache2 only detected';; + both) + if use apache2; then + [ -n "${domsg}" ] && einfo "Multiple Apache versions detected, using Apache2 (USE=apache2)" + APACHEVER=2 + else + [ -n "${domsg}" ] && einfo 'Multiple Apache versions detected, using Apache1 (USE=-apache2)' + APACHEVER=1 + fi ;; + *) if [ -n "${domsg}" ]; then + MSG="Unknown Apache version!"; eerror $MSG ; die $MSG + else + APACHEVER=0 + fi; ;; + esac +} + +detectapache + +SLOT="${APACHEVER}" +[ "${APACHEVER}" -eq '2' ] && USE_APACHE2='2' || USE_APACHE2='' + +PHPSAPI="apache${APACHEVER}" +#SRC_URI_BASE="http://downloads.php.net/ilia/" # for RC only + +# BIG FAT WARNING! +# the php eclass requires the PHPSAPI setting! +# In this case the PHPSAPI setting is dependant on the detectapache function +# above this point as well! +inherit php-sapi eutils + +DESCRIPTION="Apache module for PHP" + +DEPEND_EXTRA=">=net-www/apache-1.3.26-r2 + apache2? ( >=net-www/apache-2.0.43-r1 + !>=net-www/apache-2.0.54-r30 )" +DEPEND="${DEPEND} ${DEPEND_EXTRA}" +RDEPEND="${RDEPEND} ${DEPEND_EXTRA}" +IUSE="${IUSE} debug" +# for this revision only +PDEPEND=">=${PHP_PROVIDER_PKG}-4.4.0" +PROVIDE="${PROVIDE} virtual/httpd-php" + +# fixed PCRE library for security issues, bug #102373 +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" + +# Add a 'return 0' as we DON'T want the return code checked +pkg_setup() { + use debug && einfo "Installing in SLOT=${SLOT}" + return 0 +} + +src_unpack() { + multiinstwarn + detectapache domsg + php-sapi_src_unpack + if [ "${ARCH}" == "amd64" ] ; then + epatch ${FILESDIR}/mod_php-4.3.4-amd64hack.diff + fi + + # bug fix for security problem - bug #39952 + # second revision as the apache2 stuff was resolved upstream + epatch ${FILESDIR}/mod_php-4.3.5-apache1security.diff + + # stop php from activing the apache config, as we will do that ourselves + for i in configure sapi/apache/config.m4 sapi/apache2filter/config.m4 sapi/apache2handler/config.m4; do + sed -i.orig -e 's,-i -a -n php4,-i -n php4,g' $i + done + + # fix imap symlink creation, bug #105351 + use imap && epatch ${FILESDIR}/php4.4.0-imap-symlink.diff + + # patch to fix pspell extension, bug #99312 (new patch by upstream) + use spell && epatch "${FILESDIR}/php4.4.0-pspell-ext-segf.patch" + + # patch to fix safe_mode bypass in GD extension, bug #109669 + if use gd || use gd-external ; then + epatch "${FILESDIR}/php4.4.0-gd_safe_mode.patch" + fi + + # patch open_basedir directory bypass, bug #102943 + epatch "${FILESDIR}/php4.4.0-fopen_wrappers.patch" + + # patch to fix session.save_path segfault and other issues in + # the apache2handler SAPI, bug #107602 + epatch "${FILESDIR}/php4.4.0-session_save_path-segf.patch" + + # we need to unpack the files here, the eclass doesn't handle this + cd ${WORKDIR} + unpack php-pcrelib-new-secpatch.tar.bz2 + cd ${S} + + # patch to fix PCRE library security issues, bug #102373 + epatch ${FILESDIR}/php4.4.0-pcre-security.patch + + # sobstitute the bundled PCRE library with a fixed version for bug #102373 + einfo "Updating bundled PCRE library" + rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library" +} + +src_compile() { + # Every Apache2 MPM EXCEPT prefork needs Zend Thread Safety + if [ -n "${USE_APACHE2}" ]; then + APACHE2_MPM="`/usr/sbin/apache2 -l |egrep 'worker|perchild|leader|threadpool|prefork'|cut -d. -f1|sed -e 's/^[[:space:]]*//g;s/[[:space:]]+/ /g;'`" + einfo "Apache2 MPM: ${APACHE2_MPM}" + case "${APACHE2_MPM}" in + *prefork*) ;; + *) myconf="${myconf} --enable-experimental-zts" ; ewarn "Enabling ZTS for Apache2 MPM" ;; + esac; + fi + + # use apache2 + myconf="${myconf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" + + # Do not build CLI SAPI module. + myconf="${myconf} --disable-cli --without-pear" + + php-sapi_src_compile +} + + +src_install() { + PHP_INSTALLTARGETS="install" + php-sapi_src_install + einfo "Adding extra symlink to php.ini for Apache${USE_APACHE2}" + dodir /etc/apache${USE_APACHE2}/conf/ + dodir ${PHPINIDIRECTORY} + dosym ${PHPINIDIRECTORY}/${PHPINIFILENAME} /etc/apache${USE_APACHE2}/conf/${PHPINIFILENAME} + + einfo "Cleaning up a little" + rm -rf ${D}/usr/lib/apache${USE_APACHE2}/modules/libphp4.so + einfo "Adding extra symlink to Apache${USE_APACHE2} extramodules for PHP" + dosym /usr/lib/apache${USE_APACHE2}-extramodules ${PHPINIDIRECTORY}/lib + exeinto /usr/lib/apache${USE_APACHE2}-extramodules + einfo "Installing mod_php shared object now" + doexe .libs/libphp4.so + + if [ -n "${USE_APACHE2}" ] ; then + einfo "Installing a Apache2 config for PHP (70_mod_php.conf)" + insinto /etc/apache2/conf/modules.d + doins ${FILESDIR}/70_mod_php.conf + else + einfo "Installing a Apache config for PHP (mod_php.conf)" + insinto /etc/apache/conf/addon-modules + doins ${FILESDIR}/mod_php.conf + dosym ${PHPINIDIRECTORY}/${PHPINIFILENAME} /etc/apache/conf/addon-modules/${PHPINIFILENAME} + fi +} + +apache2msg() { + einfo "Edit /etc/conf.d/apache2 and add \"-D PHP4\" to APACHE2_OPTS" + ewarn "This is a CHANGE from previous behavior, which was \"-D PHP\"" + ewarn "This is for the upcoming PHP5 support. The ebuild will attempt" + ewarn "to make this update between PHP and PHP4 automatically" +} + +multiinstwarn() { + ewarn "Due to some previous bloopers with PHP and slotting, you may have" + ewarn "multiple instances of mod_php installed. Please look at the autoclean" + ewarn "output at the end of the emerge and unmerge all but relevant" + ewarn "instances." +} + +apache2fix() { + if egrep -q -- '-D PHP\>' /etc/conf.d/apache2; then + einfo "Attemping to update /etc/conf.d/apache2 automatically for the PHP/PHP4 change." + local oldfile="/etc/conf.d/apache2.old.`date +%Y%m%d%H%M%S`" + cp /etc/conf.d/apache2 ${oldfile} + sed -re 's,-D PHP\>,-D PHP4,g' ${oldfile} <${oldfile} >/etc/conf.d/apache2 + fi +} + + +pkg_preinst() { + multiinstwarn + [ "${APACHEVER}" -eq '2' ] && apache2fix + php-sapi_pkg_preinst +} + +pkg_postinst() { + php-sapi_pkg_postinst + multiinstwarn + einfo "To have Apache run php programs, please do the following:" + if [ -n "${USE_APACHE2}" ]; then + apache2msg + else + einfo "1. Execute the command:" + einfo " \"emerge --config =${PF}\"" + einfo "2. Edit /etc/conf.d/apache and add \"-D PHP4\" to APACHE_OPTS" + einfo "That will include the php mime types in your configuration" + einfo "automagically and setup Apache to load php when it starts." + fi +} + +pkg_config() { + multiinstwarn + if [ -n "${USE_APACHE2}" ]; then + apache2msg + else + ${ROOT}/usr/sbin/apacheaddmod \ + ${ROOT}/etc/apache/conf/apache.conf \ + extramodules/libphp4.so mod_php4.c php4_module \ + before=perl define=PHP4 addconf=conf/addon-modules/mod_php.conf + :; + fi +} diff --git a/dev-php/mod_php/mod_php-4.4.0-r5.ebuild b/dev-php/mod_php/mod_php-4.4.0-r5.ebuild new file mode 100644 index 000000000000..f4875b578a06 --- /dev/null +++ b/dev-php/mod_php/mod_php-4.4.0-r5.ebuild @@ -0,0 +1,221 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.4.0-r5.ebuild,v 1.1 2005/10/29 22:16:12 chtekk Exp $ + +IUSE="apache2" + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" + +detectapache() { + # DO NOT REPLICATE THIS IN ANY OTHER PACKAGE WITHOUT PORTAGE DEVS PERMISSION + # IT IS BROKEN AND A TEMPORARY MEASURE! + # YOU'VE BEEN WARNED. + if [[ ${EBUILD_PHASE/depend} != ${EBUILD_PHASE} ]]; then + APACHEVER=1 + return + fi + local domsg= + [ -n "$1" ] && domsg=1 + HAVE_APACHE1= + HAVE_APACHE2= + has_version '=net-www/apache-1*' && HAVE_APACHE1=1 + has_version '=net-www/apache-2*' && HAVE_APACHE2=1 + + [ -n "${HAVE_APACHE1}" ] && APACHEVER=1 + [ -n "${HAVE_APACHE2}" ] && APACHEVER=2 + [ -n "${HAVE_APACHE1}" ] && [ -n "${HAVE_APACHE2}" ] && APACHEVER='both' + + case "${APACHEVER}" in + 1) [ -n "${domsg}" ] && einfo 'Apache1 only detected' ;; + 2) [ -n "${domsg}" ] && einfo 'Apache2 only detected';; + both) + if use apache2; then + [ -n "${domsg}" ] && einfo "Multiple Apache versions detected, using Apache2 (USE=apache2)" + APACHEVER=2 + else + [ -n "${domsg}" ] && einfo 'Multiple Apache versions detected, using Apache1 (USE=-apache2)' + APACHEVER=1 + fi ;; + *) if [ -n "${domsg}" ]; then + MSG="Unknown Apache version!"; eerror $MSG ; die $MSG + else + APACHEVER=0 + fi; ;; + esac +} + +detectapache + +SLOT="${APACHEVER}" +[ "${APACHEVER}" -eq '2' ] && USE_APACHE2='2' || USE_APACHE2='' + +PHPSAPI="apache${APACHEVER}" +#SRC_URI_BASE="http://downloads.php.net/ilia/" # for RC only + +# BIG FAT WARNING! +# the php eclass requires the PHPSAPI setting! +# In this case the PHPSAPI setting is dependant on the detectapache function +# above this point as well! +inherit php-sapi eutils apache-module flag-o-matic + +DESCRIPTION="Apache module for PHP" + +DEPEND_EXTRA=">=net-www/apache-1.3.33-r10 + apache2? ( >=net-www/apache-2.0.54-r30 )" +DEPEND="${DEPEND} ${DEPEND_EXTRA}" +RDEPEND="${RDEPEND} ${DEPEND_EXTRA}" +IUSE="${IUSE} debug" +# for this revision only +PDEPEND=">=${PHP_PROVIDER_PKG}-4.4.0" +PROVIDE="${PROVIDE} virtual/httpd-php" + +# fixed PCRE library for security issues, bug #102373 +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" + +# generalize some apache{,2} vars (defined by apache-module.eclass) +if [ -n ${USE_APACHE2} ]; then + APACHE_MODULESDIR=${APACHE2_MODULESDIR} + APACHE_CONFDIR=${APACHE2_CONFDIR} +else + APACHE_MODULESDIR=${APACHE_MODULESDIR} + APACHE_CONFDIR=${APACHE_CONFDIR} +fi + +# Add a 'return 0' as we DON'T want the return code checked +pkg_setup() { + use debug && einfo "Installing in SLOT=${SLOT}" + return 0 +} + +src_unpack() { + multiinstwarn + detectapache domsg + php-sapi_src_unpack + if [ "${ARCH}" == "amd64" ] ; then + epatch ${FILESDIR}/mod_php-4.3.4-amd64hack.diff + fi + + # bug fix for security problem - bug #39952 + # second revision as the apache2 stuff was resolved upstream + epatch ${FILESDIR}/mod_php-4.3.5-apache1security.diff + + # stop php from activing the apache config, as we will do that ourselves + for i in configure sapi/apache/config.m4 sapi/apache2filter/config.m4 sapi/apache2handler/config.m4; do + sed -i.orig -e 's,-i -a -n php4,-i -n php4,g' $i + done + + # fix imap symlink creation, bug #105351 + use imap && epatch ${FILESDIR}/php4.4.0-imap-symlink.diff + + # patch to fix pspell extension, bug #99312 (new patch by upstream) + use spell && epatch "${FILESDIR}/php4.4.0-pspell-ext-segf.patch" + + # patch to fix safe_mode bypass in GD extension, bug #109669 + if use gd || use gd-external ; then + epatch "${FILESDIR}/php4.4.0-gd_safe_mode.patch" + fi + + # patch open_basedir directory bypass, bug #102943 + epatch "${FILESDIR}/php4.4.0-fopen_wrappers.patch" + + # patch to fix session.save_path segfault and other issues in + # the apache2handler SAPI, bug #107602 + epatch "${FILESDIR}/php4.4.0-session_save_path-segf.patch" + + # we need to unpack the files here, the eclass doesn't handle this + cd ${WORKDIR} + unpack php-pcrelib-new-secpatch.tar.bz2 + cd ${S} + + # patch to fix PCRE library security issues, bug #102373 + epatch ${FILESDIR}/php4.4.0-pcre-security.patch + + # sobstitute the bundled PCRE library with a fixed version for bug #102373 + einfo "Updating bundled PCRE library" + rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library" +} + +setup_environ() { + append-flags `apr-config --cppflags --cflags` +} + +src_compile() { + setup_environ + + # Every Apache2 MPM EXCEPT prefork needs Zend Thread Safety + if [ -n "${USE_APACHE2}" ]; then + APACHE2_MPM="`/usr/sbin/apache2 -l | egrep 'worker|perchild|leader|threadpool|prefork'|cut -d. -f1|sed -e 's/^[[:space:]]*//g;s/[[:space:]]+/ /g;'`" + einfo "Apache2 MPM: ${APACHE2_MPM}" + case "${APACHE2_MPM}" in + *prefork*) ;; + *peruser*) ;; + *) myconf="${myconf} --enable-experimental-zts" ; ewarn "Enabling ZTS for Apache2 MPM" ;; + esac; + fi + + #use apache2 + myconf="${myconf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" + + # Do not build CLI SAPI module. + myconf="${myconf} --disable-cli --without-pear" + + php-sapi_src_compile +} + +src_install() { + PHP_INSTALLTARGETS="install" + php-sapi_src_install + + dodir ${APACHE_CONFDIR} + dodir ${PHPINIDIRECTORY} + + einfo "Cleaning up a little" + rm -rf ${D}${APACHE_MODULESDIR}/libphp4.so + + exeinto ${APACHE_MODULESDIR} + einfo "Installing mod_php shared object now" + doexe .libs/libphp4.so + + if [ -n "${USE_APACHE2}" ] ; then + einfo "Installing a Apache2 config for PHP (70_mod_php.conf)" + insinto ${APACHE2_MODULES_CONFDIR} + doins ${FILESDIR}/4.4.0-a2/70_mod_php.conf + else + einfo "Installing a Apache config for PHP (70_mod_php.conf)" + insinto ${APACHE1_MODULES_CONFDIR} + doins ${FILESDIR}/4.4.0-a1/70_mod_php.conf + fi +} + +multiinstwarn() { + ewarn "Due to some previous bloopers with PHP and slotting, you may have" + ewarn "multiple instances of mod_php installed. Please look at the autoclean" + ewarn "output at the end of the emerge and unmerge all but relevant" + ewarn "instances." +} + +apache2fix() { + if egrep -q -- '-D PHP\>' /etc/conf.d/apache2; then + einfo "Attemping to update /etc/conf.d/apache2 automatically for the PHP/PHP4 change." + local oldfile="/etc/conf.d/apache2.old.`date +%Y%m%d%H%M%S`" + cp /etc/conf.d/apache2 ${oldfile} + sed -re 's,-D PHP\>,-D PHP4,g' ${oldfile} <${oldfile} >/etc/conf.d/apache2 + fi +} + + +pkg_preinst() { + multiinstwarn + [ "${APACHEVER}" -eq '2' ] && apache2fix + php-sapi_pkg_preinst +} + +pkg_postinst() { + php-sapi_pkg_postinst + multiinstwarn + APACHE1_MOD_DEFINE="PHP4" + APACHE1_MOD_CONF="70_mod_php.conf" + APACHE2_MOD_DEFINE="PHP4" + APACHE2_MOD_CONF="70_mod_php.conf" + apache-module_pkg_postinst +} diff --git a/dev-php/mod_php/mod_php-4.4.0.ebuild b/dev-php/mod_php/mod_php-4.4.0.ebuild index ac84fb15a1a7..eff05d2d8517 100644 --- a/dev-php/mod_php/mod_php-4.4.0.ebuild +++ b/dev-php/mod_php/mod_php-4.4.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.4.0.ebuild,v 1.18 2005/10/01 09:15:46 ferringb Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.4.0.ebuild,v 1.19 2005/10/29 22:16:12 chtekk Exp $ IUSE="apache2" @@ -181,7 +181,7 @@ pkg_postinst() { apache2msg else einfo "1. Execute the command:" - einfo " \"ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config\"" + einfo " \"emerge --config =${PF}\"" einfo "2. Edit /etc/conf.d/apache and add \"-D PHP4\" to APACHE_OPTS" einfo "That will include the php mime types in your configuration" einfo "automagically and setup Apache to load php when it starts." diff --git a/dev-php/php-cgi/ChangeLog b/dev-php/php-cgi/ChangeLog index 4fc228b8f2f7..e809f1e031b0 100644 --- a/dev-php/php-cgi/ChangeLog +++ b/dev-php/php-cgi/ChangeLog @@ -1,6 +1,23 @@ # ChangeLog for dev-php/php-cgi # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/php-cgi/ChangeLog,v 1.101 2005/10/02 14:02:26 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/php-cgi/ChangeLog,v 1.102 2005/10/29 22:16:13 chtekk Exp $ + +*php-cgi-4.4.0-r3 (29 Oct 2005) +*php-cgi-4.3.11-r3 (29 Oct 2005) + + 29 Oct 2005; Luca Longinotti + +files/php4.3.11-gd_safe_mode.patch, + +files/php4.3.11-pspell-ext-segf.patch, + +files/php4.3.11-session_save_path-segf.patch, + +files/php4.4.0-fopen_wrappers.patch, +files/php4.4.0-gd_safe_mode.patch, + +files/php4.4.0-pspell-ext-segf.patch, + +files/php4.3.11-fopen_wrappers.patch, + +files/php4.4.0-session_save_path-segf.patch, -files/stdint.diff, + php-cgi-4.3.11-r1.ebuild, php-cgi-4.3.11-r2.ebuild, + +php-cgi-4.3.11-r3.ebuild, php-cgi-4.4.0.ebuild, php-cgi-4.4.0-r1.ebuild, + php-cgi-4.4.0-r2.ebuild, +php-cgi-4.4.0-r3.ebuild: + Old-style PHP update: fix quotation of some vars, change URI of a mirror, + remove an unused patch and fix bugs #99312, #109669, #102943, #107602. 02 Oct 2005; Aron Griffis php-cgi-4.4.0-r2.ebuild: Mark 4.4.0-r2 stable on ia64 diff --git a/dev-php/php-cgi/Manifest b/dev-php/php-cgi/Manifest index 538c6d0efe72..b872a1077fea 100644 --- a/dev-php/php-cgi/Manifest +++ b/dev-php/php-cgi/Manifest @@ -1,19 +1,30 @@ -MD5 d872a25f985f00e2d9cc17379b2d0492 php-cgi-4.4.0-r1.ebuild 972 -MD5 58596c107f1a23e6be418c9dae669e74 php-cgi-4.4.0.ebuild 969 -MD5 38fe937e954ab7109395cefa86fcd2d4 metadata.xml 384 -MD5 f5e3bed7dc6d3c4c2368a825cf584f20 php-cgi-4.4.0-r2.ebuild 1693 -MD5 64c61e6bc03774965f33ab90b4537baf ChangeLog 13987 -MD5 3c748a970b69c07ad74200cb15f966a5 php-cgi-4.3.11-r2.ebuild 1839 -MD5 87afbaa27805c015e37148d0347887af php-cgi-4.3.11-r1.ebuild 1110 +MD5 106ea3229819240ce4009241c47299d6 ChangeLog 14793 +MD5 cc21a816357d93a1d31cd44f861183c7 files/digest-php-cgi-4.3.11-r1 287 +MD5 05df4c881b1833626d9a75a08a0098fd files/digest-php-cgi-4.3.11-r2 364 +MD5 05df4c881b1833626d9a75a08a0098fd files/digest-php-cgi-4.3.11-r3 364 +MD5 09d7dee078c684b0de0e4de6209ef634 files/digest-php-cgi-4.4.0 285 +MD5 09d7dee078c684b0de0e4de6209ef634 files/digest-php-cgi-4.4.0-r1 285 +MD5 472ce8342d69fdad9d2a642b03b31bac files/digest-php-cgi-4.4.0-r2 362 +MD5 472ce8342d69fdad9d2a642b03b31bac files/digest-php-cgi-4.4.0-r3 362 MD5 cdec3284251432935f950c2d15a405b7 files/php-4.3.11-flash.patch 694 +MD5 b2aa5952d5c805b3e57a5a6bf0f0b8d0 files/php-4.3.11-gmp.patch 925 +MD5 cb36a386184ed6a887f62d2205f57173 files/php4.3.11-fopen_wrappers.patch 1481 +MD5 4db8e0b66cde22dd4e4d9f51e59f6098 files/php4.3.11-gd_safe_mode.patch 1573 +MD5 47a031979331eeb527d0918d2c38cdbe files/php4.3.11-imap-symlink.diff 1238 MD5 a9b932952f12aa01a9f98a7fcbf32ed9 files/php4.3.11-pcre-security.patch 6031 +MD5 48d9c939434e9b01d0696410d59c503c files/php4.3.11-pspell-ext-segf.patch 8482 +MD5 17b906361a7ab8a3008446871623eeae files/php4.3.11-session_save_path-segf.patch 4938 +MD5 cb36a386184ed6a887f62d2205f57173 files/php4.4.0-fopen_wrappers.patch 1481 +MD5 a540c54ba22dc16b157edcf1ecb6258f files/php4.4.0-gd_safe_mode.patch 883 MD5 4c86d8ed96f2bb38b94e826c1f028c80 files/php4.4.0-imap-symlink.diff 1238 -MD5 47a031979331eeb527d0918d2c38cdbe files/php4.3.11-imap-symlink.diff 1238 -MD5 9b7f8c71395e9ac97dc87a48c9e4770d files/digest-php-cgi-4.4.0-r1 285 -MD5 b2aa5952d5c805b3e57a5a6bf0f0b8d0 files/php-4.3.11-gmp.patch 925 -MD5 ce1f1b2a1e56cf4459b2cbfdcce6b03f files/digest-php-cgi-4.3.11-r2 364 -MD5 225b57325cbdf582288a8796da9d72f5 files/digest-php-cgi-4.3.11-r1 287 -MD5 ad986b02a371b2fea3b4ae5060c9dc81 files/stdint.diff 358 -MD5 61c52577ff879166da224373e27ad11e files/digest-php-cgi-4.4.0-r2 362 -MD5 9b7f8c71395e9ac97dc87a48c9e4770d files/digest-php-cgi-4.4.0 285 MD5 54a4ad0766f89185d7de2c6d07b07296 files/php4.4.0-pcre-security.patch 6177 +MD5 48d9c939434e9b01d0696410d59c503c files/php4.4.0-pspell-ext-segf.patch 8482 +MD5 83fb9efb602c178741ea2e40e13b014f files/php4.4.0-session_save_path-segf.patch 4132 +MD5 38fe937e954ab7109395cefa86fcd2d4 metadata.xml 384 +MD5 30ef71fbfbfe2821d5bb609723920efa php-cgi-4.3.11-r1.ebuild 1118 +MD5 83fc94548a6419e7bbb8740047bd8c10 php-cgi-4.3.11-r2.ebuild 1865 +MD5 0ba5c9af3fd45a54b381bfc7f09bddce php-cgi-4.3.11-r3.ebuild 2435 +MD5 96b821432fc376e01c28d777faf074c0 php-cgi-4.4.0-r1.ebuild 974 +MD5 8720056e7b462610adfa73dbc2321e7b php-cgi-4.4.0-r2.ebuild 1713 +MD5 04ecbfe4300091b34f7e0e5612b29b09 php-cgi-4.4.0-r3.ebuild 2280 +MD5 8557de5c40270cf202fd3f43bd479ce4 php-cgi-4.4.0.ebuild 973 diff --git a/dev-php/php-cgi/files/digest-php-cgi-4.3.11-r1 b/dev-php/php-cgi/files/digest-php-cgi-4.3.11-r1 index 56f35b38ea94..46b217bb8db5 100644 --- a/dev-php/php-cgi/files/digest-php-cgi-4.3.11-r1 +++ b/dev-php/php-cgi/files/digest-php-cgi-4.3.11-r1 @@ -1,4 +1,4 @@ +MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613 MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575 MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 -MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613 diff --git a/dev-php/php-cgi/files/digest-php-cgi-4.3.11-r2 b/dev-php/php-cgi/files/digest-php-cgi-4.3.11-r2 index 30454e60ba23..8a51d50e2303 100644 --- a/dev-php/php-cgi/files/digest-php-cgi-4.3.11-r2 +++ b/dev-php/php-cgi/files/digest-php-cgi-4.3.11-r2 @@ -1,5 +1,5 @@ +MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613 MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575 MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 -MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613 MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-php/php-cgi/files/digest-php-cgi-4.3.11-r3 b/dev-php/php-cgi/files/digest-php-cgi-4.3.11-r3 new file mode 100644 index 000000000000..8a51d50e2303 --- /dev/null +++ b/dev-php/php-cgi/files/digest-php-cgi-4.3.11-r3 @@ -0,0 +1,5 @@ +MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613 +MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575 +MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 +MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 +MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-php/php-cgi/files/digest-php-cgi-4.4.0 b/dev-php/php-cgi/files/digest-php-cgi-4.4.0 index fe5e22bcebde..8f3ade5dd226 100644 --- a/dev-php/php-cgi/files/digest-php-cgi-4.4.0 +++ b/dev-php/php-cgi/files/digest-php-cgi-4.4.0 @@ -1,4 +1,4 @@ -MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 +MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 -MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 +MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 diff --git a/dev-php/php-cgi/files/digest-php-cgi-4.4.0-r1 b/dev-php/php-cgi/files/digest-php-cgi-4.4.0-r1 index fe5e22bcebde..8f3ade5dd226 100644 --- a/dev-php/php-cgi/files/digest-php-cgi-4.4.0-r1 +++ b/dev-php/php-cgi/files/digest-php-cgi-4.4.0-r1 @@ -1,4 +1,4 @@ -MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 +MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 -MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 +MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 diff --git a/dev-php/php-cgi/files/digest-php-cgi-4.4.0-r2 b/dev-php/php-cgi/files/digest-php-cgi-4.4.0-r2 index ef16f21dfdd3..dfbd3919a8b5 100644 --- a/dev-php/php-cgi/files/digest-php-cgi-4.4.0-r2 +++ b/dev-php/php-cgi/files/digest-php-cgi-4.4.0-r2 @@ -1,5 +1,5 @@ -MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 +MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 -MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 +MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-php/php-cgi/files/digest-php-cgi-4.4.0-r3 b/dev-php/php-cgi/files/digest-php-cgi-4.4.0-r3 new file mode 100644 index 000000000000..dfbd3919a8b5 --- /dev/null +++ b/dev-php/php-cgi/files/digest-php-cgi-4.4.0-r3 @@ -0,0 +1,5 @@ +MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 +MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416 +MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 +MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 +MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-php/php-cgi/files/php4.3.11-fopen_wrappers.patch b/dev-php/php-cgi/files/php4.3.11-fopen_wrappers.patch new file mode 100644 index 000000000000..672da5ece63b --- /dev/null +++ b/dev-php/php-cgi/files/php4.3.11-fopen_wrappers.patch @@ -0,0 +1,46 @@ +--- main/fopen_wrappers.c 2005/02/02 23:44:07 1.153.2.10 ++++ main/fopen_wrappers.c 2005/09/27 15:08:43 1.153.2.10.2.2 +@@ -16,7 +16,7 @@ + | Jim Winstead | + +----------------------------------------------------------------------+ + */ +-/* $Id: fopen_wrappers.c,v 1.153.2.10 2005/02/02 23:44:07 iliaa Exp $ */ ++/* $Id: fopen_wrappers.c,v 1.153.2.10.2.2 2005/09/27 15:08:43 iliaa Exp $ */ + + /* {{{ includes + */ +@@ -36,14 +36,6 @@ + #include + #define O_RDONLY _O_RDONLY + #include "win32/param.h" +-#elif defined(NETWARE) +-/*#include */ +-/*#include */ +-#ifdef NEW_LIBC +-#include +-#else +-#include "netware/param.h" +-#endif + #else + #include + #endif +@@ -57,8 +49,6 @@ + #if HAVE_PWD_H + #ifdef PHP_WIN32 + #include "win32/pwd.h" +-#elif defined(NETWARE) +-#include "netware/pwd.h" + #else + #include + #endif +@@ -120,8 +110,8 @@ PHPAPI int php_check_specific_open_based + /* Handler for basedirs that end with a / */ + resolved_basedir_len = strlen(resolved_basedir); + if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) { +- if (resolved_basedir[resolved_basedir_len - 1] == '/') { +- resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR; ++ if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { ++ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; + resolved_basedir[++resolved_basedir_len] = '\0'; + } + } diff --git a/dev-php/php-cgi/files/php4.3.11-gd_safe_mode.patch b/dev-php/php-cgi/files/php4.3.11-gd_safe_mode.patch new file mode 100644 index 000000000000..19011120eea2 --- /dev/null +++ b/dev-php/php-cgi/files/php4.3.11-gd_safe_mode.patch @@ -0,0 +1,39 @@ +--- ext/gd/gd.c 2005/01/17 17:07:57 1.221.2.54 ++++ ext/gd/gd.c 2005/10/06 20:44:52 1.221.2.56.2.1 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: gd.c,v 1.221.2.54 2005/01/17 17:07:57 sniper Exp $ */ ++/* $Id: gd.c,v 1.221.2.56.2.1 2005/10/06 20:44:52 iliaa Exp $ */ + + /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, + Cold Spring Harbor Labs. */ +@@ -1644,7 +1644,7 @@ static void _php_image_output(INTERNAL_F + } + + if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { +- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { ++ if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); + RETURN_FALSE; + } +@@ -1699,7 +1699,7 @@ static void _php_image_output(INTERNAL_F + char buf[4096]; + char *path; + +- tmp = php_open_temporary_file("", "", &path TSRMLS_CC); ++ tmp = php_open_temporary_file(NULL, NULL, &path TSRMLS_CC); + if (tmp == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open temporary file"); + RETURN_FALSE; +@@ -3017,7 +3017,8 @@ static void php_imagettftext_common(INTE + { + zval *IM, *EXT = NULL; + gdImagePtr im=NULL; +- int col = -1, x = -1, y = -1, str_len, fontname_len, i, brect[8]; ++ long col = -1, x = -1, y = -1; ++ int str_len, fontname_len, i, brect[8]; + double ptsize, angle; + unsigned char *str = NULL, *fontname = NULL; + char *error = NULL; diff --git a/dev-php/php-cgi/files/php4.3.11-pspell-ext-segf.patch b/dev-php/php-cgi/files/php4.3.11-pspell-ext-segf.patch new file mode 100644 index 000000000000..a62c42fec553 --- /dev/null +++ b/dev-php/php-cgi/files/php4.3.11-pspell-ext-segf.patch @@ -0,0 +1,317 @@ +--- ext/pspell/pspell.c 2003-08-28 22:01:29.000000000 +0200 ++++ ext/pspell/pspell.c 2005-10-26 23:24:22.000000000 +0200 +@@ -16,7 +16,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: pspell.c,v 1.28.8.5 2003/08/28 20:01:29 iliaa Exp $ */ ++/* $Id: pspell.c,v 1.28.8.5.4.2 2005/10/17 15:43:10 iliaa Exp $ */ + + #define IS_EXT_MODULE + +@@ -99,6 +99,22 @@ + delete_pspell_config(config); + } + ++#define PSPELL_FETCH_CONFIG \ ++ convert_to_long_ex(conf); \ ++ config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); \ ++ if (config == NULL || type != le_pspell_config) { \ ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); \ ++ RETURN_FALSE; \ ++ } \ ++ ++#define PSPELL_FETCH_MANAGER \ ++ convert_to_long_ex(scin); \ ++ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); \ ++ if (!manager || type != le_pspell) { \ ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); \ ++ RETURN_FALSE; \ ++ } \ ++ + /* {{{ PHP_MINIT_FUNCTION + */ + PHP_MINIT_FUNCTION(pspell) +@@ -350,14 +366,8 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(conf); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); ++ PSPELL_FETCH_CONFIG; + +- if (config == NULL || type != le_pspell_config) { +- php_error(E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); +- RETURN_FALSE; +- } +- + ret = new_pspell_manager(config); + + if(pspell_error_number(ret) != 0){ +@@ -385,13 +395,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + if(pspell_manager_check(manager, Z_STRVAL_PP(word))){ + RETURN_TRUE; +@@ -417,13 +423,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + array_init(return_value); + +@@ -455,14 +457,10 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(miss); + convert_to_string_ex(corr); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr)); + if(pspell_manager_error_number(manager) == 0){ +@@ -488,13 +486,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ + if(Z_STRLEN_PP(word) == 0){ +@@ -525,13 +519,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ + if(Z_STRLEN_PP(word) == 0){ +@@ -562,12 +552,7 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_MANAGER; + + pspell_manager_clear_session(manager); + if(pspell_manager_error_number(manager) == 0){ +@@ -593,12 +578,7 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_MANAGER; + + pspell_manager_save_all_word_lists(manager); + +@@ -666,22 +646,17 @@ + PHP_FUNCTION(pspell_config_runtogether) + { + int type; +- zval **sccin, **runtogether; ++ zval **conf, **runtogether; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_boolean_ex(runtogether); + pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false"); +@@ -695,22 +670,17 @@ + PHP_FUNCTION(pspell_config_mode) + { + int type; +- zval **sccin, **mode; ++ zval **conf, **mode; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_long_ex(mode); + +@@ -732,7 +702,7 @@ + PHP_FUNCTION(pspell_config_ignore) + { + int type; +- zval **sccin, **pignore; ++ zval **conf, **pignore; + int argc; + + int loc = PSPELL_LARGEST_WORD; +@@ -742,16 +712,11 @@ + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_long_ex(pignore); + ignore = Z_LVAL_PP(pignore); +@@ -782,22 +747,17 @@ + PHP_FUNCTION(pspell_config_personal) + { + int type; +- zval **sccin, **personal; ++ zval **conf, **personal; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&personal) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&personal) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_string_ex(personal); + +@@ -820,22 +780,17 @@ + PHP_FUNCTION(pspell_config_repl) + { + int type; +- zval **sccin, **repl; ++ zval **conf, **repl; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + pspell_config_replace(config, "save-repl", "true"); + +@@ -860,22 +815,17 @@ + PHP_FUNCTION(pspell_config_save_repl) + { + int type; +- zval **sccin, **save; ++ zval **conf, **save; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_boolean_ex(save); + pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false"); diff --git a/dev-php/php-cgi/files/php4.3.11-session_save_path-segf.patch b/dev-php/php-cgi/files/php4.3.11-session_save_path-segf.patch new file mode 100644 index 000000000000..3836776b14b4 --- /dev/null +++ b/dev-php/php-cgi/files/php4.3.11-session_save_path-segf.patch @@ -0,0 +1,154 @@ +--- sapi/apache2handler/sapi_apache2.c 2005-03-10 12:39:04.000000000 +0100 ++++ sapi/apache2handler/sapi_apache2.c 2005-10-26 16:02:03.000000000 +0200 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: sapi_apache2.c,v 1.1.2.39 2005/03/10 11:39:04 jorton Exp $ */ ++/* $Id: sapi_apache2.c,v 1.1.2.40.2.5 2005/10/12 21:41:36 tony2001 Exp $ */ + + #include + +@@ -268,23 +268,18 @@ + TSRMLS_FETCH(); + + ctx = SG(server_context); +- +- /* We use APLOG_STARTUP because it keeps us from printing the +- * data and time information at the beginning of the error log +- * line. Not sure if this is correct, but it mirrors what happens +- * with Apache 1.3 -- rbb +- */ ++ + if (ctx == NULL) { /* we haven't initialized our ctx yet, oh well */ + ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, NULL, "%s", msg); + } else { +- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, ctx->r, "%s", msg); ++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, "%s", msg); + } + } + + static void php_apache_sapi_log_message_ex(char *msg, request_rec *r) + { + if (r) { +- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, r, msg, r->filename); ++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, msg, r->filename); + } else { + php_apache_sapi_log_message(msg); + } +@@ -458,15 +453,34 @@ + request_rec *parent_req = NULL; + TSRMLS_FETCH(); + ++#define PHPAP_INI_OFF \ ++ if (strcmp(r->protocol, "INCLUDED")) { \ ++ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \ ++ } \ ++ + conf = ap_get_module_config(r->per_dir_config, &php4_module); ++ ++ /* apply_config() needs r in some cases, so allocate server_context early */ ++ ctx = SG(server_context); ++ if (ctx == NULL) { ++ ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); ++ /* register a cleanup so we clear out the SG(server_context) ++ * after each request. Note: We pass in the pointer to the ++ * server_context in case this is handled by a different thread. ++ */ ++ apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); ++ ctx->r = r; ++ ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */ ++ } else { ++ parent_req = ctx->r; ++ ctx->r = r; ++ } + apply_config(conf); + + if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) { + /* Check for xbithack in this case. */ + if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return DECLINED; + } + } +@@ -475,32 +489,24 @@ + * the configuration; default behaviour is to accept. */ + if (r->used_path_info == AP_REQ_REJECT_PATH_INFO + && r->path_info && r->path_info[0]) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_NOT_FOUND; + } + + /* handle situations where user turns the engine off */ + if (!AP2(engine)) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return DECLINED; + } + + if (r->finfo.filetype == 0) { + php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r); +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_NOT_FOUND; + } + if (r->finfo.filetype == APR_DIR) { + php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r); +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_FORBIDDEN; + } + +@@ -516,24 +522,30 @@ + + zend_first_try { + +- ctx = SG(server_context); + if (ctx == NULL) { +- ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); +- /* register a cleanup so we clear out the SG(server_context) +- * after each request. Note: We pass in the pointer to the +- * server_context in case this is handled by a different thread. +- */ +- apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); +- +- ctx->r = r; ++normal: + brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc); ++ ctx = SG(server_context); + ctx->brigade = brigade; + + if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { + zend_bailout(); + } + } else { +- parent_req = ctx->r; ++ if (!parent_req) { ++ parent_req = ctx->r; ++ } ++ if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) { ++ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { ++ zend_bailout(); ++ } ++ } ++ ++ /* check if comming due to ErrorDocument */ ++ if (parent_req && parent_req->status != HTTP_OK) { ++ parent_req = NULL; ++ goto normal; ++ } + ctx->r = r; + brigade = ctx->brigade; + } diff --git a/dev-php/php-cgi/files/php4.4.0-fopen_wrappers.patch b/dev-php/php-cgi/files/php4.4.0-fopen_wrappers.patch new file mode 100644 index 000000000000..672da5ece63b --- /dev/null +++ b/dev-php/php-cgi/files/php4.4.0-fopen_wrappers.patch @@ -0,0 +1,46 @@ +--- main/fopen_wrappers.c 2005/02/02 23:44:07 1.153.2.10 ++++ main/fopen_wrappers.c 2005/09/27 15:08:43 1.153.2.10.2.2 +@@ -16,7 +16,7 @@ + | Jim Winstead | + +----------------------------------------------------------------------+ + */ +-/* $Id: fopen_wrappers.c,v 1.153.2.10 2005/02/02 23:44:07 iliaa Exp $ */ ++/* $Id: fopen_wrappers.c,v 1.153.2.10.2.2 2005/09/27 15:08:43 iliaa Exp $ */ + + /* {{{ includes + */ +@@ -36,14 +36,6 @@ + #include + #define O_RDONLY _O_RDONLY + #include "win32/param.h" +-#elif defined(NETWARE) +-/*#include */ +-/*#include */ +-#ifdef NEW_LIBC +-#include +-#else +-#include "netware/param.h" +-#endif + #else + #include + #endif +@@ -57,8 +49,6 @@ + #if HAVE_PWD_H + #ifdef PHP_WIN32 + #include "win32/pwd.h" +-#elif defined(NETWARE) +-#include "netware/pwd.h" + #else + #include + #endif +@@ -120,8 +110,8 @@ PHPAPI int php_check_specific_open_based + /* Handler for basedirs that end with a / */ + resolved_basedir_len = strlen(resolved_basedir); + if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) { +- if (resolved_basedir[resolved_basedir_len - 1] == '/') { +- resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR; ++ if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { ++ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; + resolved_basedir[++resolved_basedir_len] = '\0'; + } + } diff --git a/dev-php/php-cgi/files/php4.4.0-gd_safe_mode.patch b/dev-php/php-cgi/files/php4.4.0-gd_safe_mode.patch new file mode 100644 index 000000000000..1e0d49d1373c --- /dev/null +++ b/dev-php/php-cgi/files/php4.4.0-gd_safe_mode.patch @@ -0,0 +1,20 @@ +--- ext/gd/gd.c 2005/05/06 16:51:54 1.221.2.56 ++++ ext/gd/gd.c 2005/10/06 20:44:52 1.221.2.56.2.1 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: gd.c,v 1.221.2.56 2005/05/06 16:51:54 tony2001 Exp $ */ ++/* $Id: gd.c,v 1.221.2.56.2.1 2005/10/06 20:44:52 iliaa Exp $ */ + + /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, + Cold Spring Harbor Labs. */ +@@ -1644,7 +1644,7 @@ static void _php_image_output(INTERNAL_F + } + + if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { +- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { ++ if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); + RETURN_FALSE; + } diff --git a/dev-php/php-cgi/files/php4.4.0-pspell-ext-segf.patch b/dev-php/php-cgi/files/php4.4.0-pspell-ext-segf.patch new file mode 100644 index 000000000000..a62c42fec553 --- /dev/null +++ b/dev-php/php-cgi/files/php4.4.0-pspell-ext-segf.patch @@ -0,0 +1,317 @@ +--- ext/pspell/pspell.c 2003-08-28 22:01:29.000000000 +0200 ++++ ext/pspell/pspell.c 2005-10-26 23:24:22.000000000 +0200 +@@ -16,7 +16,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: pspell.c,v 1.28.8.5 2003/08/28 20:01:29 iliaa Exp $ */ ++/* $Id: pspell.c,v 1.28.8.5.4.2 2005/10/17 15:43:10 iliaa Exp $ */ + + #define IS_EXT_MODULE + +@@ -99,6 +99,22 @@ + delete_pspell_config(config); + } + ++#define PSPELL_FETCH_CONFIG \ ++ convert_to_long_ex(conf); \ ++ config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); \ ++ if (config == NULL || type != le_pspell_config) { \ ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); \ ++ RETURN_FALSE; \ ++ } \ ++ ++#define PSPELL_FETCH_MANAGER \ ++ convert_to_long_ex(scin); \ ++ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); \ ++ if (!manager || type != le_pspell) { \ ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); \ ++ RETURN_FALSE; \ ++ } \ ++ + /* {{{ PHP_MINIT_FUNCTION + */ + PHP_MINIT_FUNCTION(pspell) +@@ -350,14 +366,8 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(conf); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); ++ PSPELL_FETCH_CONFIG; + +- if (config == NULL || type != le_pspell_config) { +- php_error(E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); +- RETURN_FALSE; +- } +- + ret = new_pspell_manager(config); + + if(pspell_error_number(ret) != 0){ +@@ -385,13 +395,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + if(pspell_manager_check(manager, Z_STRVAL_PP(word))){ + RETURN_TRUE; +@@ -417,13 +423,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + array_init(return_value); + +@@ -455,14 +457,10 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(miss); + convert_to_string_ex(corr); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr)); + if(pspell_manager_error_number(manager) == 0){ +@@ -488,13 +486,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ + if(Z_STRLEN_PP(word) == 0){ +@@ -525,13 +519,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ + if(Z_STRLEN_PP(word) == 0){ +@@ -562,12 +552,7 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_MANAGER; + + pspell_manager_clear_session(manager); + if(pspell_manager_error_number(manager) == 0){ +@@ -593,12 +578,7 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_MANAGER; + + pspell_manager_save_all_word_lists(manager); + +@@ -666,22 +646,17 @@ + PHP_FUNCTION(pspell_config_runtogether) + { + int type; +- zval **sccin, **runtogether; ++ zval **conf, **runtogether; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_boolean_ex(runtogether); + pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false"); +@@ -695,22 +670,17 @@ + PHP_FUNCTION(pspell_config_mode) + { + int type; +- zval **sccin, **mode; ++ zval **conf, **mode; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_long_ex(mode); + +@@ -732,7 +702,7 @@ + PHP_FUNCTION(pspell_config_ignore) + { + int type; +- zval **sccin, **pignore; ++ zval **conf, **pignore; + int argc; + + int loc = PSPELL_LARGEST_WORD; +@@ -742,16 +712,11 @@ + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_long_ex(pignore); + ignore = Z_LVAL_PP(pignore); +@@ -782,22 +747,17 @@ + PHP_FUNCTION(pspell_config_personal) + { + int type; +- zval **sccin, **personal; ++ zval **conf, **personal; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&personal) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&personal) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_string_ex(personal); + +@@ -820,22 +780,17 @@ + PHP_FUNCTION(pspell_config_repl) + { + int type; +- zval **sccin, **repl; ++ zval **conf, **repl; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + pspell_config_replace(config, "save-repl", "true"); + +@@ -860,22 +815,17 @@ + PHP_FUNCTION(pspell_config_save_repl) + { + int type; +- zval **sccin, **save; ++ zval **conf, **save; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_boolean_ex(save); + pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false"); diff --git a/dev-php/php-cgi/files/php4.4.0-session_save_path-segf.patch b/dev-php/php-cgi/files/php4.4.0-session_save_path-segf.patch new file mode 100644 index 000000000000..8f936ae5ec39 --- /dev/null +++ b/dev-php/php-cgi/files/php4.4.0-session_save_path-segf.patch @@ -0,0 +1,127 @@ +--- sapi/apache2handler/sapi_apache2.c 2005/04/08 20:35:02 1.1.2.40 ++++ sapi/apache2handler/sapi_apache2.c 2005/10/12 21:41:36 1.1.2.40.2.5 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: sapi_apache2.c,v 1.1.2.40 2005/04/08 20:35:02 sniper Exp $ */ ++/* $Id: sapi_apache2.c,v 1.1.2.40.2.5 2005/10/12 21:41:36 tony2001 Exp $ */ + + #include + +@@ -453,15 +453,34 @@ static int php_handler(request_rec *r) + request_rec *parent_req = NULL; + TSRMLS_FETCH(); + ++#define PHPAP_INI_OFF \ ++ if (strcmp(r->protocol, "INCLUDED")) { \ ++ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \ ++ } \ ++ + conf = ap_get_module_config(r->per_dir_config, &php4_module); ++ ++ /* apply_config() needs r in some cases, so allocate server_context early */ ++ ctx = SG(server_context); ++ if (ctx == NULL) { ++ ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); ++ /* register a cleanup so we clear out the SG(server_context) ++ * after each request. Note: We pass in the pointer to the ++ * server_context in case this is handled by a different thread. ++ */ ++ apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); ++ ctx->r = r; ++ ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */ ++ } else { ++ parent_req = ctx->r; ++ ctx->r = r; ++ } + apply_config(conf); + + if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) { + /* Check for xbithack in this case. */ + if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return DECLINED; + } + } +@@ -470,32 +489,24 @@ static int php_handler(request_rec *r) + * the configuration; default behaviour is to accept. */ + if (r->used_path_info == AP_REQ_REJECT_PATH_INFO + && r->path_info && r->path_info[0]) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_NOT_FOUND; + } + + /* handle situations where user turns the engine off */ + if (!AP2(engine)) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return DECLINED; + } + + if (r->finfo.filetype == 0) { + php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r); +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_NOT_FOUND; + } + if (r->finfo.filetype == APR_DIR) { + php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r); +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_FORBIDDEN; + } + +@@ -511,24 +522,30 @@ static int php_handler(request_rec *r) + + zend_first_try { + +- ctx = SG(server_context); + if (ctx == NULL) { +- ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); +- /* register a cleanup so we clear out the SG(server_context) +- * after each request. Note: We pass in the pointer to the +- * server_context in case this is handled by a different thread. +- */ +- apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); +- +- ctx->r = r; ++normal: + brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc); ++ ctx = SG(server_context); + ctx->brigade = brigade; + + if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { + zend_bailout(); + } + } else { +- parent_req = ctx->r; ++ if (!parent_req) { ++ parent_req = ctx->r; ++ } ++ if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) { ++ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { ++ zend_bailout(); ++ } ++ } ++ ++ /* check if comming due to ErrorDocument */ ++ if (parent_req && parent_req->status != HTTP_OK) { ++ parent_req = NULL; ++ goto normal; ++ } + ctx->r = r; + brigade = ctx->brigade; + } diff --git a/dev-php/php-cgi/files/stdint.diff b/dev-php/php-cgi/files/stdint.diff deleted file mode 100644 index 451d7fb44cf3..000000000000 --- a/dev-php/php-cgi/files/stdint.diff +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nura php-4.3.10/Zend/zend_strtod.c php-4.3.10.stdint/Zend/zend_strtod.c ---- php-4.3.10/Zend/zend_strtod.c 2004-12-14 05:35:26.000000000 -0300 -+++ php-4.3.10.stdint/Zend/zend_strtod.c 2004-12-16 15:33:47.000000000 -0300 -@@ -128,6 +128,7 @@ - #endif - - #if defined(__sparc__) || defined(__ppc__) -+#include - #define u_int32_t uint32_t - #endif - diff --git a/dev-php/php-cgi/php-cgi-4.3.11-r1.ebuild b/dev-php/php-cgi/php-cgi-4.3.11-r1.ebuild index 3b80c87d6099..b4bd1de7c346 100644 --- a/dev-php/php-cgi/php-cgi-4.3.11-r1.ebuild +++ b/dev-php/php-cgi/php-cgi-4.3.11-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/php-cgi/php-cgi-4.3.11-r1.ebuild,v 1.6 2005/07/16 15:30:12 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/php-cgi/php-cgi-4.3.11-r1.ebuild,v 1.7 2005/10/29 22:16:13 chtekk Exp $ PHPSAPI="cgi" inherit php-sapi eutils @@ -18,10 +18,10 @@ src_unpack() { php-sapi_src_unpack # Bug 88756 - use flash && epatch ${FILESDIR}/php-4.3.11-flash.patch + use flash && epatch "${FILESDIR}/php-4.3.11-flash.patch" # Bug 88795 - use gmp && epatch ${FILESDIR}/php-4.3.11-gmp.patch + use gmp && epatch "${FILESDIR}/php-4.3.11-gmp.patch" } src_compile() { @@ -42,9 +42,9 @@ src_install() { PHP_INSTALLTARGETS="install" php-sapi_src_install - rm -f ${D}/usr/bin/php + rm -f "${D}/usr/bin/php" # rename binary - newbin ${S}/sapi/cgi/php php-cgi + newbin "${S}/sapi/cgi/php" php-cgi } pkg_postinst() { diff --git a/dev-php/php-cgi/php-cgi-4.3.11-r2.ebuild b/dev-php/php-cgi/php-cgi-4.3.11-r2.ebuild index 7d4686f51964..3591d0e54fe2 100644 --- a/dev-php/php-cgi/php-cgi-4.3.11-r2.ebuild +++ b/dev-php/php-cgi/php-cgi-4.3.11-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/php-cgi/php-cgi-4.3.11-r2.ebuild,v 1.5 2005/09/27 02:52:56 weeve Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/php-cgi/php-cgi-4.3.11-r2.ebuild,v 1.6 2005/10/29 22:16:13 chtekk Exp $ PHPSAPI="cgi" inherit php-sapi eutils @@ -15,31 +15,31 @@ PDEPEND=">=${PHP_PROVIDER_PKG}-4.3.11" PROVIDE="${PROVIDE} virtual/httpd-php" # fixed PCRE library for security issues, bug #102373 -SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" src_unpack() { php-sapi_src_unpack # Bug 88756 - use flash && epatch ${FILESDIR}/php-4.3.11-flash.patch + use flash && epatch "${FILESDIR}/php-4.3.11-flash.patch" # Bug 88795 - use gmp && epatch ${FILESDIR}/php-4.3.11-gmp.patch + use gmp && epatch "${FILESDIR}/php-4.3.11-gmp.patch" # fix imap symlink creation, bug #105351 - use imap && epatch ${FILESDIR}/php4.3.11-imap-symlink.diff + use imap && epatch "${FILESDIR}/php4.3.11-imap-symlink.diff" # we need to unpack the files here, the eclass doesn't handle this - cd ${WORKDIR} + cd "${WORKDIR}" unpack php-pcrelib-new-secpatch.tar.bz2 - cd ${S} + cd "${S}" # patch to fix PCRE library security issues, bug #102373 - epatch ${FILESDIR}/php4.3.11-pcre-security.patch + epatch "${FILESDIR}/php4.3.11-pcre-security.patch" # sobstitute the bundled PCRE library with a fixed version for bug #102373 einfo "Updating bundled PCRE library" - rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library" + rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library" } src_compile() { @@ -60,9 +60,9 @@ src_install() { PHP_INSTALLTARGETS="install" php-sapi_src_install - rm -f ${D}/usr/bin/php + rm -f "${D}/usr/bin/php" # rename binary - newbin ${S}/sapi/cgi/php php-cgi + newbin "${S}/sapi/cgi/php" php-cgi } pkg_postinst() { diff --git a/dev-php/php-cgi/php-cgi-4.3.11-r3.ebuild b/dev-php/php-cgi/php-cgi-4.3.11-r3.ebuild new file mode 100644 index 000000000000..da81c96245a2 --- /dev/null +++ b/dev-php/php-cgi/php-cgi-4.3.11-r3.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php/php-cgi/php-cgi-4.3.11-r3.ebuild,v 1.1 2005/10/29 22:16:13 chtekk Exp $ + +PHPSAPI="cgi" +inherit php-sapi eutils + +DESCRIPTION="PHP CGI" +SLOT="0" +IUSE="force-cgi-redirect" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~sparc ~x86" + +# for this revision only +PDEPEND=">=${PHP_PROVIDER_PKG}-4.3.11" +PROVIDE="${PROVIDE} virtual/httpd-php" + +# fixed PCRE library for security issues, bug #102373 +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" + +src_unpack() { + php-sapi_src_unpack + + # Bug 88756 + use flash && epatch "${FILESDIR}/php-4.3.11-flash.patch" + + # Bug 88795 + use gmp && epatch "${FILESDIR}/php-4.3.11-gmp.patch" + + # fix imap symlink creation, bug #105351 + use imap && epatch "${FILESDIR}/php4.3.11-imap-symlink.diff" + + # patch to fix pspell extension, bug #99312 (new patch by upstream) + use spell && epatch "${FILESDIR}/php4.3.11-pspell-ext-segf.patch" + + # patch to fix safe_mode bypass in GD extension, bug #109669 + if use gd || use gd-external ; then + epatch "${FILESDIR}/php4.3.11-gd_safe_mode.patch" + fi + + # patch open_basedir directory bypass, bug #102943 + epatch "${FILESDIR}/php4.3.11-fopen_wrappers.patch" + + # patch to fix session.save_path segfault and other issues in + # the apache2handler SAPI, bug #107602 + epatch "${FILESDIR}/php4.3.11-session_save_path-segf.patch" + + # we need to unpack the files here, the eclass doesn't handle this + cd "${WORKDIR}" + unpack php-pcrelib-new-secpatch.tar.bz2 + cd "${S}" + + # patch to fix PCRE library security issues, bug #102373 + epatch "${FILESDIR}/php4.3.11-pcre-security.patch" + + # sobstitute the bundled PCRE library with a fixed version for bug #102373 + einfo "Updating bundled PCRE library" + rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library" +} + +src_compile() { + # CLI needed to build stuff + myconf="${myconf} \ + --enable-cgi \ + --enable-cli \ + --enable-fastcgi" + + if use force-cgi-redirect; then + myconf="${myconf} --enable-force-cgi-redirect" + fi + + php-sapi_src_compile +} + +src_install() { + PHP_INSTALLTARGETS="install" + php-sapi_src_install + + rm -f "${D}/usr/bin/php" + # rename binary + newbin "${S}/sapi/cgi/php" php-cgi +} + +pkg_postinst() { + php-sapi_pkg_postinst + einfo "This is a CGI only build." +} diff --git a/dev-php/php-cgi/php-cgi-4.4.0-r1.ebuild b/dev-php/php-cgi/php-cgi-4.4.0-r1.ebuild index f1ff839e2524..24742722ec39 100644 --- a/dev-php/php-cgi/php-cgi-4.4.0-r1.ebuild +++ b/dev-php/php-cgi/php-cgi-4.4.0-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/php-cgi/php-cgi-4.4.0-r1.ebuild,v 1.2 2005/07/16 15:30:12 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/php-cgi/php-cgi-4.4.0-r1.ebuild,v 1.3 2005/10/29 22:16:13 chtekk Exp $ PHPSAPI="cgi" inherit php-sapi eutils @@ -37,7 +37,7 @@ src_install() { php-sapi_src_install # rename binary - newbin ${S}/sapi/cgi/php php-cgi + newbin "${S}/sapi/cgi/php" php-cgi } pkg_postinst() { diff --git a/dev-php/php-cgi/php-cgi-4.4.0-r2.ebuild b/dev-php/php-cgi/php-cgi-4.4.0-r2.ebuild index 50ea27390eeb..cbc5b3a0482e 100644 --- a/dev-php/php-cgi/php-cgi-4.4.0-r2.ebuild +++ b/dev-php/php-cgi/php-cgi-4.4.0-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/php-cgi/php-cgi-4.4.0-r2.ebuild,v 1.6 2005/10/02 14:02:26 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/php-cgi/php-cgi-4.4.0-r2.ebuild,v 1.7 2005/10/29 22:16:13 chtekk Exp $ PHPSAPI="cgi" inherit php-sapi eutils @@ -15,25 +15,25 @@ PDEPEND=">=${PHP_PROVIDER_PKG}-4.4.0" PROVIDE="${PROVIDE} virtual/httpd-php" # fixed PCRE library for security issues, bug #102373 -SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" src_unpack() { php-sapi_src_unpack # fix imap symlink creation, bug #105351 - use imap && epatch ${FILESDIR}/php4.4.0-imap-symlink.diff + use imap && epatch "${FILESDIR}/php4.4.0-imap-symlink.diff" # we need to unpack the files here, the eclass doesn't handle this - cd ${WORKDIR} + cd "${WORKDIR}" unpack php-pcrelib-new-secpatch.tar.bz2 - cd ${S} + cd "${S}" # patch to fix PCRE library security issues, bug #102373 - epatch ${FILESDIR}/php4.4.0-pcre-security.patch + epatch "${FILESDIR}/php4.4.0-pcre-security.patch" # sobstitute the bundled PCRE library with a fixed version for bug #102373 einfo "Updating bundled PCRE library" - rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library" + rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library" } src_compile() { @@ -55,7 +55,7 @@ src_install() { php-sapi_src_install # rename binary - newbin ${S}/sapi/cgi/php php-cgi + newbin "${S}/sapi/cgi/php" php-cgi } pkg_postinst() { diff --git a/dev-php/php-cgi/php-cgi-4.4.0-r3.ebuild b/dev-php/php-cgi/php-cgi-4.4.0-r3.ebuild new file mode 100644 index 000000000000..baf1865e49d7 --- /dev/null +++ b/dev-php/php-cgi/php-cgi-4.4.0-r3.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php/php-cgi/php-cgi-4.4.0-r3.ebuild,v 1.1 2005/10/29 22:16:13 chtekk Exp $ + +PHPSAPI="cgi" +inherit php-sapi eutils + +DESCRIPTION="PHP CGI" +SLOT="0" +IUSE="fastcgi force-cgi-redirect" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~sparc ~x86" + +# for this revision only +PDEPEND=">=${PHP_PROVIDER_PKG}-4.4.0" +PROVIDE="${PROVIDE} virtual/httpd-php" + +# fixed PCRE library for security issues, bug #102373 +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" + +src_unpack() { + php-sapi_src_unpack + + # fix imap symlink creation, bug #105351 + use imap && epatch "${FILESDIR}/php4.4.0-imap-symlink.diff" + + # patch to fix pspell extension, bug #99312 (new patch by upstream) + use spell && epatch "${FILESDIR}/php4.4.0-pspell-ext-segf.patch" + + # patch to fix safe_mode bypass in GD extension, bug #109669 + if use gd || use gd-external ; then + epatch "${FILESDIR}/php4.4.0-gd_safe_mode.patch" + fi + + # patch open_basedir directory bypass, bug #102943 + epatch "${FILESDIR}/php4.4.0-fopen_wrappers.patch" + + # patch to fix session.save_path segfault and other issues in + # the apache2handler SAPI, bug #107602 + epatch "${FILESDIR}/php4.4.0-session_save_path-segf.patch" + + # we need to unpack the files here, the eclass doesn't handle this + cd "${WORKDIR}" + unpack php-pcrelib-new-secpatch.tar.bz2 + cd "${S}" + + # patch to fix PCRE library security issues, bug #102373 + epatch "${FILESDIR}/php4.4.0-pcre-security.patch" + + # sobstitute the bundled PCRE library with a fixed version for bug #102373 + einfo "Updating bundled PCRE library" + rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library" +} + +src_compile() { + myconf="${myconf} --enable-cgi --disable-cli" + + if use fastcgi; then + myconf="${myconf} --enable-fastcgi" + fi + + if use force-cgi-redirect; then + myconf="${myconf} --enable-force-cgi-redirect" + fi + + php-sapi_src_compile +} + +src_install() { + PHP_INSTALLTARGETS="install" + php-sapi_src_install + + # rename binary + newbin "${S}/sapi/cgi/php" php-cgi +} + +pkg_postinst() { + php-sapi_pkg_postinst + einfo "This is a CGI only build." +} diff --git a/dev-php/php-cgi/php-cgi-4.4.0.ebuild b/dev-php/php-cgi/php-cgi-4.4.0.ebuild index 3e9c8fc62804..710df7443540 100644 --- a/dev-php/php-cgi/php-cgi-4.4.0.ebuild +++ b/dev-php/php-cgi/php-cgi-4.4.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/php-cgi/php-cgi-4.4.0.ebuild,v 1.10 2005/07/24 05:30:09 hardave Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/php-cgi/php-cgi-4.4.0.ebuild,v 1.11 2005/10/29 22:16:13 chtekk Exp $ PHPSAPI="cgi" inherit php-sapi eutils @@ -36,9 +36,9 @@ src_install() { PHP_INSTALLTARGETS="install" php-sapi_src_install - rm -f ${D}/usr/bin/php + rm -f "${D}/usr/bin/php" # rename binary - newbin ${S}/sapi/cgi/php php-cgi + newbin "${S}/sapi/cgi/php" php-cgi } pkg_postinst() { diff --git a/dev-php/php/ChangeLog b/dev-php/php/ChangeLog index 1b44d6c279ee..3bf7ef81a868 100644 --- a/dev-php/php/ChangeLog +++ b/dev-php/php/ChangeLog @@ -1,6 +1,22 @@ # ChangeLog for dev-php/php # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/php/ChangeLog,v 1.195 2005/10/02 13:57:26 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/php/ChangeLog,v 1.196 2005/10/29 22:16:13 chtekk Exp $ + +*php-4.4.0-r2 (29 Oct 2005) +*php-4.3.11-r2 (29 Oct 2005) + + 29 Oct 2005; Luca Longinotti + +files/php4.3.11-gd_safe_mode.patch, + +files/php4.3.11-pspell-ext-segf.patch, + +files/php4.3.11-session_save_path-segf.patch, + +files/php4.4.0-fopen_wrappers.patch, +files/php4.4.0-gd_safe_mode.patch, + -files/libmbfl-headers.patch, +files/php4.3.11-fopen_wrappers.patch, + +files/php4.4.0-pspell-ext-segf.patch, + +files/php4.4.0-session_save_path-segf.patch, -files/stdint.diff, + php-4.3.11.ebuild, php-4.3.11-r1.ebuild, +php-4.3.11-r2.ebuild, + php-4.4.0.ebuild, php-4.4.0-r1.ebuild, +php-4.4.0-r2.ebuild: + Old-style PHP update: fix quotation of some vars, change URI of a mirror, + remove two unused patches and fix bugs #99312, #109669, #102943, #107602. 02 Oct 2005; Aron Griffis php-4.4.0-r1.ebuild: Mark 4.4.0-r1 stable on ia64 diff --git a/dev-php/php/Manifest b/dev-php/php/Manifest index 9089c3ece77b..3ce71201629c 100644 --- a/dev-php/php/Manifest +++ b/dev-php/php/Manifest @@ -1,29 +1,29 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 7d4aa22887055dc44402c1c89228c586 ChangeLog 26618 -MD5 c3936dcc33eacdde589f42f0f28e4bd6 files/digest-php-4.3.11 213 -MD5 d1536bfe7ebf7dab5076fcd56b03250a files/digest-php-4.3.11-r1 290 -MD5 b3403a09e5d5fa394900b99ca6f63335 files/digest-php-4.4.0 211 -MD5 58cd61c7ae093d9e2b847d68e76b88a2 files/digest-php-4.4.0-r1 288 -MD5 522f94bfc40f65c2263785f960035875 files/libmbfl-headers.patch 309 +MD5 c1a27c2215058036b12a30e665df6da6 ChangeLog 27395 +MD5 289778209b2df87dbc5052351e604b1a files/digest-php-4.3.11 213 +MD5 a7b81d42cc56fdd6c72fbe2549dbe898 files/digest-php-4.3.11-r1 290 +MD5 a7b81d42cc56fdd6c72fbe2549dbe898 files/digest-php-4.3.11-r2 290 +MD5 f25bbe20f37a0eb83f7a57ca2c3a25e3 files/digest-php-4.4.0 211 +MD5 43c5b30a9e9bde68a44cf414341e32e8 files/digest-php-4.4.0-r1 288 +MD5 43c5b30a9e9bde68a44cf414341e32e8 files/digest-php-4.4.0-r2 288 MD5 cdec3284251432935f950c2d15a405b7 files/php-4.3.11-flash.patch 694 MD5 b2aa5952d5c805b3e57a5a6bf0f0b8d0 files/php-4.3.11-gmp.patch 925 MD5 7515e9b1dc298a0fb1c12d35a58c265d files/php-4.3.4-amd64hack.diff 1028 +MD5 cb36a386184ed6a887f62d2205f57173 files/php4.3.11-fopen_wrappers.patch 1481 +MD5 4db8e0b66cde22dd4e4d9f51e59f6098 files/php4.3.11-gd_safe_mode.patch 1573 MD5 47a031979331eeb527d0918d2c38cdbe files/php4.3.11-imap-symlink.diff 1238 MD5 a9b932952f12aa01a9f98a7fcbf32ed9 files/php4.3.11-pcre-security.patch 6031 +MD5 48d9c939434e9b01d0696410d59c503c files/php4.3.11-pspell-ext-segf.patch 8482 +MD5 17b906361a7ab8a3008446871623eeae files/php4.3.11-session_save_path-segf.patch 4938 +MD5 cb36a386184ed6a887f62d2205f57173 files/php4.4.0-fopen_wrappers.patch 1481 +MD5 a540c54ba22dc16b157edcf1ecb6258f files/php4.4.0-gd_safe_mode.patch 883 MD5 4c86d8ed96f2bb38b94e826c1f028c80 files/php4.4.0-imap-symlink.diff 1238 MD5 54a4ad0766f89185d7de2c6d07b07296 files/php4.4.0-pcre-security.patch 6177 -MD5 ad986b02a371b2fea3b4ae5060c9dc81 files/stdint.diff 358 +MD5 48d9c939434e9b01d0696410d59c503c files/php4.4.0-pspell-ext-segf.patch 8482 +MD5 83fb9efb602c178741ea2e40e13b014f files/php4.4.0-session_save_path-segf.patch 4132 MD5 38fe937e954ab7109395cefa86fcd2d4 metadata.xml 384 -MD5 2630de70f85b3e7115124be4489ad515 php-4.3.11-r1.ebuild 1947 -MD5 eaa1a899f214a9ad1a095e9f6a4f5fc5 php-4.3.11.ebuild 1214 -MD5 6c2b68141ee6ebe197a6f9296c0a9365 php-4.4.0-r1.ebuild 1811 -MD5 1832b7dad433181a1ea82028e176f098 php-4.4.0.ebuild 1080 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2 (GNU/Linux) - -iD4DBQFDSLx+gIKl8Uu19MoRAlkkAJ95oq86rerma3XPiGiiOU9RXn0kvgCYwdfA -KTwI7BwN1UHd8+HX9GXoDg== -=55EK ------END PGP SIGNATURE----- +MD5 13f16673a3322d2526c41304a92cb258 php-4.3.11-r1.ebuild 1971 +MD5 97a173f74e09115932bb77211bf0811a php-4.3.11-r2.ebuild 2542 +MD5 c726df49806f6e7c5df1af60e62c9393 php-4.3.11.ebuild 1220 +MD5 85507b461b039104ec28adcc96072bb9 php-4.4.0-r1.ebuild 1831 +MD5 001529d07933cef3c221786bc9d5b2c1 php-4.4.0-r2.ebuild 2401 +MD5 936cb97f05b9e214aa8840adcb11d090 php-4.4.0.ebuild 1082 diff --git a/dev-php/php/files/digest-php-4.3.11 b/dev-php/php/files/digest-php-4.3.11 index ee98e2095709..afa221c26709 100644 --- a/dev-php/php/files/digest-php-4.3.11 +++ b/dev-php/php/files/digest-php-4.3.11 @@ -1,3 +1,3 @@ +MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613 MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575 MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 -MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613 diff --git a/dev-php/php/files/digest-php-4.3.11-r1 b/dev-php/php/files/digest-php-4.3.11-r1 index 5bff16fceb06..252c3a932b24 100644 --- a/dev-php/php/files/digest-php-4.3.11-r1 +++ b/dev-php/php/files/digest-php-4.3.11-r1 @@ -1,4 +1,4 @@ +MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613 MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575 MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 -MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613 MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-php/php/files/digest-php-4.3.11-r2 b/dev-php/php/files/digest-php-4.3.11-r2 new file mode 100644 index 000000000000..252c3a932b24 --- /dev/null +++ b/dev-php/php/files/digest-php-4.3.11-r2 @@ -0,0 +1,4 @@ +MD5 611cdddabfd71ffb724c428be33c14cb hardening-patch-4.3.11-0.3.2.patch.gz 80613 +MD5 fbc67d240812136a9842bc1f2a217b7a php-4.3.11.tar.bz2 4012575 +MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 +MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-php/php/files/digest-php-4.4.0 b/dev-php/php/files/digest-php-4.4.0 index 70d0e03a076c..413538df8e6b 100644 --- a/dev-php/php/files/digest-php-4.4.0 +++ b/dev-php/php/files/digest-php-4.4.0 @@ -1,3 +1,3 @@ -MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 -MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 +MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 +MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 diff --git a/dev-php/php/files/digest-php-4.4.0-r1 b/dev-php/php/files/digest-php-4.4.0-r1 index 1471bf09112b..077ffb8eedda 100644 --- a/dev-php/php/files/digest-php-4.4.0-r1 +++ b/dev-php/php/files/digest-php-4.4.0-r1 @@ -1,4 +1,4 @@ -MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 -MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 +MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 +MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-php/php/files/digest-php-4.4.0-r2 b/dev-php/php/files/digest-php-4.4.0-r2 new file mode 100644 index 000000000000..077ffb8eedda --- /dev/null +++ b/dev-php/php/files/digest-php-4.4.0-r2 @@ -0,0 +1,4 @@ +MD5 0a52b85692ebbc299e6b1f6d9d206691 hardening-patch-4.4.0-0.3.2.patch.gz 33347 +MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285 +MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074 +MD5 33be24619f3a10953f9e1e32beeee97a php-pcrelib-new-secpatch.tar.bz2 357619 diff --git a/dev-php/php/files/libmbfl-headers.patch b/dev-php/php/files/libmbfl-headers.patch deleted file mode 100644 index cb1cd65f14ed..000000000000 --- a/dev-php/php/files/libmbfl-headers.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- scripts/Makefile.frag.old 2005-02-28 06:40:38.693990560 +0100 -+++ scripts/Makefile.frag 2005-02-28 06:40:51.610027024 +0100 -@@ -37,6 +37,8 @@ - ext/xml/ \ - ext/xml/expat/ \ - ext/mbstring/ \ -+ ext/mbstring/libmbfl/ \ -+ ext/mbstring/libmbfl/mbfl/ \ - ext/sqlite/libsqlite/src/sqlite.h - - install-headers: diff --git a/dev-php/php/files/php4.3.11-fopen_wrappers.patch b/dev-php/php/files/php4.3.11-fopen_wrappers.patch new file mode 100644 index 000000000000..672da5ece63b --- /dev/null +++ b/dev-php/php/files/php4.3.11-fopen_wrappers.patch @@ -0,0 +1,46 @@ +--- main/fopen_wrappers.c 2005/02/02 23:44:07 1.153.2.10 ++++ main/fopen_wrappers.c 2005/09/27 15:08:43 1.153.2.10.2.2 +@@ -16,7 +16,7 @@ + | Jim Winstead | + +----------------------------------------------------------------------+ + */ +-/* $Id: fopen_wrappers.c,v 1.153.2.10 2005/02/02 23:44:07 iliaa Exp $ */ ++/* $Id: fopen_wrappers.c,v 1.153.2.10.2.2 2005/09/27 15:08:43 iliaa Exp $ */ + + /* {{{ includes + */ +@@ -36,14 +36,6 @@ + #include + #define O_RDONLY _O_RDONLY + #include "win32/param.h" +-#elif defined(NETWARE) +-/*#include */ +-/*#include */ +-#ifdef NEW_LIBC +-#include +-#else +-#include "netware/param.h" +-#endif + #else + #include + #endif +@@ -57,8 +49,6 @@ + #if HAVE_PWD_H + #ifdef PHP_WIN32 + #include "win32/pwd.h" +-#elif defined(NETWARE) +-#include "netware/pwd.h" + #else + #include + #endif +@@ -120,8 +110,8 @@ PHPAPI int php_check_specific_open_based + /* Handler for basedirs that end with a / */ + resolved_basedir_len = strlen(resolved_basedir); + if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) { +- if (resolved_basedir[resolved_basedir_len - 1] == '/') { +- resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR; ++ if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { ++ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; + resolved_basedir[++resolved_basedir_len] = '\0'; + } + } diff --git a/dev-php/php/files/php4.3.11-gd_safe_mode.patch b/dev-php/php/files/php4.3.11-gd_safe_mode.patch new file mode 100644 index 000000000000..19011120eea2 --- /dev/null +++ b/dev-php/php/files/php4.3.11-gd_safe_mode.patch @@ -0,0 +1,39 @@ +--- ext/gd/gd.c 2005/01/17 17:07:57 1.221.2.54 ++++ ext/gd/gd.c 2005/10/06 20:44:52 1.221.2.56.2.1 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: gd.c,v 1.221.2.54 2005/01/17 17:07:57 sniper Exp $ */ ++/* $Id: gd.c,v 1.221.2.56.2.1 2005/10/06 20:44:52 iliaa Exp $ */ + + /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, + Cold Spring Harbor Labs. */ +@@ -1644,7 +1644,7 @@ static void _php_image_output(INTERNAL_F + } + + if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { +- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { ++ if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); + RETURN_FALSE; + } +@@ -1699,7 +1699,7 @@ static void _php_image_output(INTERNAL_F + char buf[4096]; + char *path; + +- tmp = php_open_temporary_file("", "", &path TSRMLS_CC); ++ tmp = php_open_temporary_file(NULL, NULL, &path TSRMLS_CC); + if (tmp == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open temporary file"); + RETURN_FALSE; +@@ -3017,7 +3017,8 @@ static void php_imagettftext_common(INTE + { + zval *IM, *EXT = NULL; + gdImagePtr im=NULL; +- int col = -1, x = -1, y = -1, str_len, fontname_len, i, brect[8]; ++ long col = -1, x = -1, y = -1; ++ int str_len, fontname_len, i, brect[8]; + double ptsize, angle; + unsigned char *str = NULL, *fontname = NULL; + char *error = NULL; diff --git a/dev-php/php/files/php4.3.11-pspell-ext-segf.patch b/dev-php/php/files/php4.3.11-pspell-ext-segf.patch new file mode 100644 index 000000000000..a62c42fec553 --- /dev/null +++ b/dev-php/php/files/php4.3.11-pspell-ext-segf.patch @@ -0,0 +1,317 @@ +--- ext/pspell/pspell.c 2003-08-28 22:01:29.000000000 +0200 ++++ ext/pspell/pspell.c 2005-10-26 23:24:22.000000000 +0200 +@@ -16,7 +16,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: pspell.c,v 1.28.8.5 2003/08/28 20:01:29 iliaa Exp $ */ ++/* $Id: pspell.c,v 1.28.8.5.4.2 2005/10/17 15:43:10 iliaa Exp $ */ + + #define IS_EXT_MODULE + +@@ -99,6 +99,22 @@ + delete_pspell_config(config); + } + ++#define PSPELL_FETCH_CONFIG \ ++ convert_to_long_ex(conf); \ ++ config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); \ ++ if (config == NULL || type != le_pspell_config) { \ ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); \ ++ RETURN_FALSE; \ ++ } \ ++ ++#define PSPELL_FETCH_MANAGER \ ++ convert_to_long_ex(scin); \ ++ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); \ ++ if (!manager || type != le_pspell) { \ ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); \ ++ RETURN_FALSE; \ ++ } \ ++ + /* {{{ PHP_MINIT_FUNCTION + */ + PHP_MINIT_FUNCTION(pspell) +@@ -350,14 +366,8 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(conf); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); ++ PSPELL_FETCH_CONFIG; + +- if (config == NULL || type != le_pspell_config) { +- php_error(E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); +- RETURN_FALSE; +- } +- + ret = new_pspell_manager(config); + + if(pspell_error_number(ret) != 0){ +@@ -385,13 +395,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + if(pspell_manager_check(manager, Z_STRVAL_PP(word))){ + RETURN_TRUE; +@@ -417,13 +423,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + array_init(return_value); + +@@ -455,14 +457,10 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(miss); + convert_to_string_ex(corr); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr)); + if(pspell_manager_error_number(manager) == 0){ +@@ -488,13 +486,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ + if(Z_STRLEN_PP(word) == 0){ +@@ -525,13 +519,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ + if(Z_STRLEN_PP(word) == 0){ +@@ -562,12 +552,7 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_MANAGER; + + pspell_manager_clear_session(manager); + if(pspell_manager_error_number(manager) == 0){ +@@ -593,12 +578,7 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_MANAGER; + + pspell_manager_save_all_word_lists(manager); + +@@ -666,22 +646,17 @@ + PHP_FUNCTION(pspell_config_runtogether) + { + int type; +- zval **sccin, **runtogether; ++ zval **conf, **runtogether; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_boolean_ex(runtogether); + pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false"); +@@ -695,22 +670,17 @@ + PHP_FUNCTION(pspell_config_mode) + { + int type; +- zval **sccin, **mode; ++ zval **conf, **mode; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_long_ex(mode); + +@@ -732,7 +702,7 @@ + PHP_FUNCTION(pspell_config_ignore) + { + int type; +- zval **sccin, **pignore; ++ zval **conf, **pignore; + int argc; + + int loc = PSPELL_LARGEST_WORD; +@@ -742,16 +712,11 @@ + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_long_ex(pignore); + ignore = Z_LVAL_PP(pignore); +@@ -782,22 +747,17 @@ + PHP_FUNCTION(pspell_config_personal) + { + int type; +- zval **sccin, **personal; ++ zval **conf, **personal; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&personal) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&personal) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_string_ex(personal); + +@@ -820,22 +780,17 @@ + PHP_FUNCTION(pspell_config_repl) + { + int type; +- zval **sccin, **repl; ++ zval **conf, **repl; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + pspell_config_replace(config, "save-repl", "true"); + +@@ -860,22 +815,17 @@ + PHP_FUNCTION(pspell_config_save_repl) + { + int type; +- zval **sccin, **save; ++ zval **conf, **save; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_boolean_ex(save); + pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false"); diff --git a/dev-php/php/files/php4.3.11-session_save_path-segf.patch b/dev-php/php/files/php4.3.11-session_save_path-segf.patch new file mode 100644 index 000000000000..3836776b14b4 --- /dev/null +++ b/dev-php/php/files/php4.3.11-session_save_path-segf.patch @@ -0,0 +1,154 @@ +--- sapi/apache2handler/sapi_apache2.c 2005-03-10 12:39:04.000000000 +0100 ++++ sapi/apache2handler/sapi_apache2.c 2005-10-26 16:02:03.000000000 +0200 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: sapi_apache2.c,v 1.1.2.39 2005/03/10 11:39:04 jorton Exp $ */ ++/* $Id: sapi_apache2.c,v 1.1.2.40.2.5 2005/10/12 21:41:36 tony2001 Exp $ */ + + #include + +@@ -268,23 +268,18 @@ + TSRMLS_FETCH(); + + ctx = SG(server_context); +- +- /* We use APLOG_STARTUP because it keeps us from printing the +- * data and time information at the beginning of the error log +- * line. Not sure if this is correct, but it mirrors what happens +- * with Apache 1.3 -- rbb +- */ ++ + if (ctx == NULL) { /* we haven't initialized our ctx yet, oh well */ + ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, NULL, "%s", msg); + } else { +- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, ctx->r, "%s", msg); ++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, "%s", msg); + } + } + + static void php_apache_sapi_log_message_ex(char *msg, request_rec *r) + { + if (r) { +- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, r, msg, r->filename); ++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, msg, r->filename); + } else { + php_apache_sapi_log_message(msg); + } +@@ -458,15 +453,34 @@ + request_rec *parent_req = NULL; + TSRMLS_FETCH(); + ++#define PHPAP_INI_OFF \ ++ if (strcmp(r->protocol, "INCLUDED")) { \ ++ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \ ++ } \ ++ + conf = ap_get_module_config(r->per_dir_config, &php4_module); ++ ++ /* apply_config() needs r in some cases, so allocate server_context early */ ++ ctx = SG(server_context); ++ if (ctx == NULL) { ++ ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); ++ /* register a cleanup so we clear out the SG(server_context) ++ * after each request. Note: We pass in the pointer to the ++ * server_context in case this is handled by a different thread. ++ */ ++ apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); ++ ctx->r = r; ++ ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */ ++ } else { ++ parent_req = ctx->r; ++ ctx->r = r; ++ } + apply_config(conf); + + if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) { + /* Check for xbithack in this case. */ + if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return DECLINED; + } + } +@@ -475,32 +489,24 @@ + * the configuration; default behaviour is to accept. */ + if (r->used_path_info == AP_REQ_REJECT_PATH_INFO + && r->path_info && r->path_info[0]) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_NOT_FOUND; + } + + /* handle situations where user turns the engine off */ + if (!AP2(engine)) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return DECLINED; + } + + if (r->finfo.filetype == 0) { + php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r); +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_NOT_FOUND; + } + if (r->finfo.filetype == APR_DIR) { + php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r); +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_FORBIDDEN; + } + +@@ -516,24 +522,30 @@ + + zend_first_try { + +- ctx = SG(server_context); + if (ctx == NULL) { +- ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); +- /* register a cleanup so we clear out the SG(server_context) +- * after each request. Note: We pass in the pointer to the +- * server_context in case this is handled by a different thread. +- */ +- apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); +- +- ctx->r = r; ++normal: + brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc); ++ ctx = SG(server_context); + ctx->brigade = brigade; + + if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { + zend_bailout(); + } + } else { +- parent_req = ctx->r; ++ if (!parent_req) { ++ parent_req = ctx->r; ++ } ++ if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) { ++ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { ++ zend_bailout(); ++ } ++ } ++ ++ /* check if comming due to ErrorDocument */ ++ if (parent_req && parent_req->status != HTTP_OK) { ++ parent_req = NULL; ++ goto normal; ++ } + ctx->r = r; + brigade = ctx->brigade; + } diff --git a/dev-php/php/files/php4.4.0-fopen_wrappers.patch b/dev-php/php/files/php4.4.0-fopen_wrappers.patch new file mode 100644 index 000000000000..672da5ece63b --- /dev/null +++ b/dev-php/php/files/php4.4.0-fopen_wrappers.patch @@ -0,0 +1,46 @@ +--- main/fopen_wrappers.c 2005/02/02 23:44:07 1.153.2.10 ++++ main/fopen_wrappers.c 2005/09/27 15:08:43 1.153.2.10.2.2 +@@ -16,7 +16,7 @@ + | Jim Winstead | + +----------------------------------------------------------------------+ + */ +-/* $Id: fopen_wrappers.c,v 1.153.2.10 2005/02/02 23:44:07 iliaa Exp $ */ ++/* $Id: fopen_wrappers.c,v 1.153.2.10.2.2 2005/09/27 15:08:43 iliaa Exp $ */ + + /* {{{ includes + */ +@@ -36,14 +36,6 @@ + #include + #define O_RDONLY _O_RDONLY + #include "win32/param.h" +-#elif defined(NETWARE) +-/*#include */ +-/*#include */ +-#ifdef NEW_LIBC +-#include +-#else +-#include "netware/param.h" +-#endif + #else + #include + #endif +@@ -57,8 +49,6 @@ + #if HAVE_PWD_H + #ifdef PHP_WIN32 + #include "win32/pwd.h" +-#elif defined(NETWARE) +-#include "netware/pwd.h" + #else + #include + #endif +@@ -120,8 +110,8 @@ PHPAPI int php_check_specific_open_based + /* Handler for basedirs that end with a / */ + resolved_basedir_len = strlen(resolved_basedir); + if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) { +- if (resolved_basedir[resolved_basedir_len - 1] == '/') { +- resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR; ++ if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { ++ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; + resolved_basedir[++resolved_basedir_len] = '\0'; + } + } diff --git a/dev-php/php/files/php4.4.0-gd_safe_mode.patch b/dev-php/php/files/php4.4.0-gd_safe_mode.patch new file mode 100644 index 000000000000..1e0d49d1373c --- /dev/null +++ b/dev-php/php/files/php4.4.0-gd_safe_mode.patch @@ -0,0 +1,20 @@ +--- ext/gd/gd.c 2005/05/06 16:51:54 1.221.2.56 ++++ ext/gd/gd.c 2005/10/06 20:44:52 1.221.2.56.2.1 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: gd.c,v 1.221.2.56 2005/05/06 16:51:54 tony2001 Exp $ */ ++/* $Id: gd.c,v 1.221.2.56.2.1 2005/10/06 20:44:52 iliaa Exp $ */ + + /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, + Cold Spring Harbor Labs. */ +@@ -1644,7 +1644,7 @@ static void _php_image_output(INTERNAL_F + } + + if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { +- if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { ++ if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(fn, "rb+", CHECKUID_CHECK_FILE_AND_DIR))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); + RETURN_FALSE; + } diff --git a/dev-php/php/files/php4.4.0-pspell-ext-segf.patch b/dev-php/php/files/php4.4.0-pspell-ext-segf.patch new file mode 100644 index 000000000000..a62c42fec553 --- /dev/null +++ b/dev-php/php/files/php4.4.0-pspell-ext-segf.patch @@ -0,0 +1,317 @@ +--- ext/pspell/pspell.c 2003-08-28 22:01:29.000000000 +0200 ++++ ext/pspell/pspell.c 2005-10-26 23:24:22.000000000 +0200 +@@ -16,7 +16,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: pspell.c,v 1.28.8.5 2003/08/28 20:01:29 iliaa Exp $ */ ++/* $Id: pspell.c,v 1.28.8.5.4.2 2005/10/17 15:43:10 iliaa Exp $ */ + + #define IS_EXT_MODULE + +@@ -99,6 +99,22 @@ + delete_pspell_config(config); + } + ++#define PSPELL_FETCH_CONFIG \ ++ convert_to_long_ex(conf); \ ++ config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); \ ++ if (config == NULL || type != le_pspell_config) { \ ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); \ ++ RETURN_FALSE; \ ++ } \ ++ ++#define PSPELL_FETCH_MANAGER \ ++ convert_to_long_ex(scin); \ ++ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); \ ++ if (!manager || type != le_pspell) { \ ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", Z_LVAL_PP(scin)); \ ++ RETURN_FALSE; \ ++ } \ ++ + /* {{{ PHP_MINIT_FUNCTION + */ + PHP_MINIT_FUNCTION(pspell) +@@ -350,14 +366,8 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(conf); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type); ++ PSPELL_FETCH_CONFIG; + +- if (config == NULL || type != le_pspell_config) { +- php_error(E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf)); +- RETURN_FALSE; +- } +- + ret = new_pspell_manager(config); + + if(pspell_error_number(ret) != 0){ +@@ -385,13 +395,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + if(pspell_manager_check(manager, Z_STRVAL_PP(word))){ + RETURN_TRUE; +@@ -417,13 +423,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + array_init(return_value); + +@@ -455,14 +457,10 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(miss); + convert_to_string_ex(corr); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + pspell_manager_store_replacement(manager, Z_STRVAL_PP(miss), Z_STRVAL_PP(corr)); + if(pspell_manager_error_number(manager) == 0){ +@@ -488,13 +486,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ + if(Z_STRLEN_PP(word) == 0){ +@@ -525,13 +519,9 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); + convert_to_string_ex(word); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ ++ PSPELL_FETCH_MANAGER; + + /*If the word is empty, we have to return; otherwise we'll segfault! ouch!*/ + if(Z_STRLEN_PP(word) == 0){ +@@ -562,12 +552,7 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_MANAGER; + + pspell_manager_clear_session(manager); + if(pspell_manager_error_number(manager) == 0){ +@@ -593,12 +578,7 @@ + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(scin); +- manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type); +- if(!manager){ +- php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_MANAGER; + + pspell_manager_save_all_word_lists(manager); + +@@ -666,22 +646,17 @@ + PHP_FUNCTION(pspell_config_runtogether) + { + int type; +- zval **sccin, **runtogether; ++ zval **conf, **runtogether; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&runtogether) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&runtogether) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_boolean_ex(runtogether); + pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ? "true" : "false"); +@@ -695,22 +670,17 @@ + PHP_FUNCTION(pspell_config_mode) + { + int type; +- zval **sccin, **mode; ++ zval **conf, **mode; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&mode) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&mode) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_long_ex(mode); + +@@ -732,7 +702,7 @@ + PHP_FUNCTION(pspell_config_ignore) + { + int type; +- zval **sccin, **pignore; ++ zval **conf, **pignore; + int argc; + + int loc = PSPELL_LARGEST_WORD; +@@ -742,16 +712,11 @@ + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&pignore) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&pignore) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_long_ex(pignore); + ignore = Z_LVAL_PP(pignore); +@@ -782,22 +747,17 @@ + PHP_FUNCTION(pspell_config_personal) + { + int type; +- zval **sccin, **personal; ++ zval **conf, **personal; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&personal) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&personal) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_string_ex(personal); + +@@ -820,22 +780,17 @@ + PHP_FUNCTION(pspell_config_repl) + { + int type; +- zval **sccin, **repl; ++ zval **conf, **repl; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&repl) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&repl) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + pspell_config_replace(config, "save-repl", "true"); + +@@ -860,22 +815,17 @@ + PHP_FUNCTION(pspell_config_save_repl) + { + int type; +- zval **sccin, **save; ++ zval **conf, **save; + int argc; + + PspellConfig *config; + + argc = ZEND_NUM_ARGS(); +- if (argc != 2 || zend_get_parameters_ex(argc,&sccin,&save) == FAILURE) { ++ if (argc != 2 || zend_get_parameters_ex(argc,&conf,&save) == FAILURE) { + WRONG_PARAM_COUNT; + } + +- convert_to_long_ex(sccin); +- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type); +- if(!config){ +- php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin)); +- RETURN_FALSE; +- } ++ PSPELL_FETCH_CONFIG; + + convert_to_boolean_ex(save); + pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" : "false"); diff --git a/dev-php/php/files/php4.4.0-session_save_path-segf.patch b/dev-php/php/files/php4.4.0-session_save_path-segf.patch new file mode 100644 index 000000000000..8f936ae5ec39 --- /dev/null +++ b/dev-php/php/files/php4.4.0-session_save_path-segf.patch @@ -0,0 +1,127 @@ +--- sapi/apache2handler/sapi_apache2.c 2005/04/08 20:35:02 1.1.2.40 ++++ sapi/apache2handler/sapi_apache2.c 2005/10/12 21:41:36 1.1.2.40.2.5 +@@ -18,7 +18,7 @@ + +----------------------------------------------------------------------+ + */ + +-/* $Id: sapi_apache2.c,v 1.1.2.40 2005/04/08 20:35:02 sniper Exp $ */ ++/* $Id: sapi_apache2.c,v 1.1.2.40.2.5 2005/10/12 21:41:36 tony2001 Exp $ */ + + #include + +@@ -453,15 +453,34 @@ static int php_handler(request_rec *r) + request_rec *parent_req = NULL; + TSRMLS_FETCH(); + ++#define PHPAP_INI_OFF \ ++ if (strcmp(r->protocol, "INCLUDED")) { \ ++ zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \ ++ } \ ++ + conf = ap_get_module_config(r->per_dir_config, &php4_module); ++ ++ /* apply_config() needs r in some cases, so allocate server_context early */ ++ ctx = SG(server_context); ++ if (ctx == NULL) { ++ ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); ++ /* register a cleanup so we clear out the SG(server_context) ++ * after each request. Note: We pass in the pointer to the ++ * server_context in case this is handled by a different thread. ++ */ ++ apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); ++ ctx->r = r; ++ ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */ ++ } else { ++ parent_req = ctx->r; ++ ctx->r = r; ++ } + apply_config(conf); + + if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) { + /* Check for xbithack in this case. */ + if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return DECLINED; + } + } +@@ -470,32 +489,24 @@ static int php_handler(request_rec *r) + * the configuration; default behaviour is to accept. */ + if (r->used_path_info == AP_REQ_REJECT_PATH_INFO + && r->path_info && r->path_info[0]) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_NOT_FOUND; + } + + /* handle situations where user turns the engine off */ + if (!AP2(engine)) { +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return DECLINED; + } + + if (r->finfo.filetype == 0) { + php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r); +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_NOT_FOUND; + } + if (r->finfo.filetype == APR_DIR) { + php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r); +- zend_try { +- zend_ini_deactivate(TSRMLS_C); +- } zend_end_try(); ++ PHPAP_INI_OFF; + return HTTP_FORBIDDEN; + } + +@@ -511,24 +522,30 @@ static int php_handler(request_rec *r) + + zend_first_try { + +- ctx = SG(server_context); + if (ctx == NULL) { +- ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); +- /* register a cleanup so we clear out the SG(server_context) +- * after each request. Note: We pass in the pointer to the +- * server_context in case this is handled by a different thread. +- */ +- apr_pool_cleanup_register(r->pool, (void *)&SG(server_context), php_server_context_cleanup, apr_pool_cleanup_null); +- +- ctx->r = r; ++normal: + brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc); ++ ctx = SG(server_context); + ctx->brigade = brigade; + + if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { + zend_bailout(); + } + } else { +- parent_req = ctx->r; ++ if (!parent_req) { ++ parent_req = ctx->r; ++ } ++ if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) { ++ if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { ++ zend_bailout(); ++ } ++ } ++ ++ /* check if comming due to ErrorDocument */ ++ if (parent_req && parent_req->status != HTTP_OK) { ++ parent_req = NULL; ++ goto normal; ++ } + ctx->r = r; + brigade = ctx->brigade; + } diff --git a/dev-php/php/files/stdint.diff b/dev-php/php/files/stdint.diff deleted file mode 100644 index 451d7fb44cf3..000000000000 --- a/dev-php/php/files/stdint.diff +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nura php-4.3.10/Zend/zend_strtod.c php-4.3.10.stdint/Zend/zend_strtod.c ---- php-4.3.10/Zend/zend_strtod.c 2004-12-14 05:35:26.000000000 -0300 -+++ php-4.3.10.stdint/Zend/zend_strtod.c 2004-12-16 15:33:47.000000000 -0300 -@@ -128,6 +128,7 @@ - #endif - - #if defined(__sparc__) || defined(__ppc__) -+#include - #define u_int32_t uint32_t - #endif - diff --git a/dev-php/php/php-4.3.11-r1.ebuild b/dev-php/php/php-4.3.11-r1.ebuild index 163b37671f02..1a1888fb439f 100644 --- a/dev-php/php/php-4.3.11-r1.ebuild +++ b/dev-php/php/php-4.3.11-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.3.11-r1.ebuild,v 1.6 2005/09/27 02:47:28 weeve Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.3.11-r1.ebuild,v 1.7 2005/10/29 22:16:13 chtekk Exp $ PHPSAPI="cli" inherit php-sapi eutils @@ -11,32 +11,32 @@ KEYWORDS="alpha amd64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" IUSE="" # fixed PCRE library for security issues, bug #102373 -SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" src_unpack() { php-sapi_src_unpack - [ "${ARCH}" == "amd64" ] && epatch ${FILESDIR}/php-4.3.4-amd64hack.diff + [ "${ARCH}" == "amd64" ] && epatch "${FILESDIR}/php-4.3.4-amd64hack.diff" # Bug 88756 - use flash && epatch ${FILESDIR}/php-4.3.11-flash.patch + use flash && epatch "${FILESDIR}/php-4.3.11-flash.patch" # Bug 88795 - use gmp && epatch ${FILESDIR}/php-4.3.11-gmp.patch + use gmp && epatch "${FILESDIR}/php-4.3.11-gmp.patch" # fix imap symlink creation, bug #105351 - use imap && epatch ${FILESDIR}/php4.3.11-imap-symlink.diff + use imap && epatch "${FILESDIR}/php4.3.11-imap-symlink.diff" # we need to unpack the files here, the eclass doesn't handle this - cd ${WORKDIR} + cd "${WORKDIR}" unpack php-pcrelib-new-secpatch.tar.bz2 - cd ${S} + cd "${S}" # patch to fix PCRE library security issues, bug #102373 - epatch ${FILESDIR}/php4.3.11-pcre-security.patch + epatch "${FILESDIR}/php4.3.11-pcre-security.patch" # sobstitute the bundled PCRE library with a fixed version for bug #102373 einfo "Updating bundled PCRE library" - rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library" + rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library" } src_compile() { diff --git a/dev-php/php/php-4.3.11-r2.ebuild b/dev-php/php/php-4.3.11-r2.ebuild new file mode 100644 index 000000000000..450cd3ea9a62 --- /dev/null +++ b/dev-php/php/php-4.3.11-r2.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.3.11-r2.ebuild,v 1.1 2005/10/29 22:16:13 chtekk Exp $ + +PHPSAPI="cli" +inherit php-sapi eutils + +DESCRIPTION="PHP Shell Interpreter" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="" + +# fixed PCRE library for security issues, bug #102373 +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" + +src_unpack() { + php-sapi_src_unpack + [ "${ARCH}" == "amd64" ] && epatch "${FILESDIR}/php-4.3.4-amd64hack.diff" + + # Bug 88756 + use flash && epatch "${FILESDIR}/php-4.3.11-flash.patch" + + # Bug 88795 + use gmp && epatch "${FILESDIR}/php-4.3.11-gmp.patch" + + # fix imap symlink creation, bug #105351 + use imap && epatch "${FILESDIR}/php4.3.11-imap-symlink.diff" + + # patch to fix pspell extension, bug #99312 (new patch by upstream) + use spell && epatch "${FILESDIR}/php4.3.11-pspell-ext-segf.patch" + + # patch to fix safe_mode bypass in GD extension, bug #109669 + if use gd || use gd-external ; then + epatch "${FILESDIR}/php4.3.11-gd_safe_mode.patch" + fi + + # patch open_basedir directory bypass, bug #102943 + epatch "${FILESDIR}/php4.3.11-fopen_wrappers.patch" + + # patch to fix session.save_path segfault and other issues in + # the apache2handler SAPI, bug #107602 + epatch "${FILESDIR}/php4.3.11-session_save_path-segf.patch" + + # we need to unpack the files here, the eclass doesn't handle this + cd "${WORKDIR}" + unpack php-pcrelib-new-secpatch.tar.bz2 + cd "${S}" + + # patch to fix PCRE library security issues, bug #102373 + epatch "${FILESDIR}/php4.3.11-pcre-security.patch" + + # sobstitute the bundled PCRE library with a fixed version for bug #102373 + einfo "Updating bundled PCRE library" + rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library" +} + +src_compile() { + myconf="${myconf} \ + --disable-cgi \ + --enable-cli" + + php-sapi_src_compile +} + + +src_install() { + PHP_INSTALLTARGETS="install" + php-sapi_src_install + + einfo "Installing manpage" + doman sapi/cli/php.1 +} + +pkg_postinst() { + php-sapi_pkg_postinst + einfo "This is a CLI only build." + einfo "You cannot use it on a webserver." + + if [ -f "${ROOT}/root/.pearrc" -a "`md5sum ${ROOT}/root/.pearrc`" = "f0243f51b2457bc545158cf066e4e7a2 ${ROOT}/root/.pearrc" ]; then + einfo "Cleaning up an old PEAR install glitch" + mv ${ROOT}/root/.pearrc ${ROOT}/root/.pearrc.`date +%Y%m%d%H%M%S` + fi +} diff --git a/dev-php/php/php-4.3.11.ebuild b/dev-php/php/php-4.3.11.ebuild index 29187969957e..cca71b2de8e0 100644 --- a/dev-php/php/php-4.3.11.ebuild +++ b/dev-php/php/php-4.3.11.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.3.11.ebuild,v 1.13 2005/07/08 04:07:42 hardave Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.3.11.ebuild,v 1.14 2005/10/29 22:16:13 chtekk Exp $ PHPSAPI="cli" inherit php-sapi eutils @@ -12,13 +12,13 @@ IUSE="" src_unpack() { php-sapi_src_unpack - [ "${ARCH}" == "amd64" ] && epatch ${FILESDIR}/php-4.3.4-amd64hack.diff + [ "${ARCH}" == "amd64" ] && epatch "${FILESDIR}/php-4.3.4-amd64hack.diff" # Bug 88756 - use flash && epatch ${FILESDIR}/php-4.3.11-flash.patch + use flash && epatch "${FILESDIR}/php-4.3.11-flash.patch" # Bug 88795 - use gmp && epatch ${FILESDIR}/php-4.3.11-gmp.patch + use gmp && epatch "${FILESDIR}/php-4.3.11-gmp.patch" } src_compile() { diff --git a/dev-php/php/php-4.4.0-r1.ebuild b/dev-php/php/php-4.4.0-r1.ebuild index cf74dd07ae43..10f3405ea033 100644 --- a/dev-php/php/php-4.4.0-r1.ebuild +++ b/dev-php/php/php-4.4.0-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.4.0-r1.ebuild,v 1.8 2005/10/09 06:43:26 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.4.0-r1.ebuild,v 1.9 2005/10/29 22:16:13 chtekk Exp $ PHPSAPI="cli" inherit php-sapi eutils @@ -11,26 +11,26 @@ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86" IUSE="" # fixed PCRE library for security issues, bug #102373 -SRC_URI="${SRC_URI} http://dl.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" src_unpack() { php-sapi_src_unpack - [ "${ARCH}" == "amd64" ] && epatch ${FILESDIR}/php-4.3.4-amd64hack.diff + [ "${ARCH}" == "amd64" ] && epatch "${FILESDIR}/php-4.3.4-amd64hack.diff" # fix imap symlink creation, bug #105351 - use imap && epatch ${FILESDIR}/php4.4.0-imap-symlink.diff + use imap && epatch "${FILESDIR}/php4.4.0-imap-symlink.diff" # we need to unpack the files here, the eclass doesn't handle this - cd ${WORKDIR} + cd "${WORKDIR}" unpack php-pcrelib-new-secpatch.tar.bz2 - cd ${S} + cd "${S}" # patch to fix PCRE library security issues, bug #102373 - epatch ${FILESDIR}/php4.4.0-pcre-security.patch + epatch "${FILESDIR}/php4.4.0-pcre-security.patch" # sobstitute the bundled PCRE library with a fixed version for bug #102373 einfo "Updating bundled PCRE library" - rm -rf ${S}/ext/pcre/pcrelib && mv -f ${WORKDIR}/pcrelib-new ${S}/ext/pcre/pcrelib || die "Unable to update the bundled PCRE library" + rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library" } src_compile() { diff --git a/dev-php/php/php-4.4.0-r2.ebuild b/dev-php/php/php-4.4.0-r2.ebuild new file mode 100644 index 000000000000..9d210d3ca575 --- /dev/null +++ b/dev-php/php/php-4.4.0-r2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.4.0-r2.ebuild,v 1.1 2005/10/29 22:16:13 chtekk Exp $ + +PHPSAPI="cli" +inherit php-sapi eutils + +DESCRIPTION="PHP Shell Interpreter" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="" + +# fixed PCRE library for security issues, bug #102373 +SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-pcrelib-new-secpatch.tar.bz2" + +src_unpack() { + php-sapi_src_unpack + [ "${ARCH}" == "amd64" ] && epatch "${FILESDIR}/php-4.3.4-amd64hack.diff" + + # fix imap symlink creation, bug #105351 + use imap && epatch "${FILESDIR}/php4.4.0-imap-symlink.diff" + + # patch to fix pspell extension, bug #99312 (new patch by upstream) + use spell && epatch "${FILESDIR}/php4.4.0-pspell-ext-segf.patch" + + # patch to fix safe_mode bypass in GD extension, bug #109669 + if use gd || use gd-external ; then + epatch "${FILESDIR}/php4.4.0-gd_safe_mode.patch" + fi + + # patch open_basedir directory bypass, bug #102943 + epatch "${FILESDIR}/php4.4.0-fopen_wrappers.patch" + + # patch to fix session.save_path segfault and other issues in + # the apache2handler SAPI, bug #107602 + epatch "${FILESDIR}/php4.4.0-session_save_path-segf.patch" + + # we need to unpack the files here, the eclass doesn't handle this + cd "${WORKDIR}" + unpack php-pcrelib-new-secpatch.tar.bz2 + cd "${S}" + + # patch to fix PCRE library security issues, bug #102373 + epatch "${FILESDIR}/php4.4.0-pcre-security.patch" + + # sobstitute the bundled PCRE library with a fixed version for bug #102373 + einfo "Updating bundled PCRE library" + rm -rf "${S}/ext/pcre/pcrelib" && mv -f "${WORKDIR}/pcrelib-new" "${S}/ext/pcre/pcrelib" || die "Unable to update the bundled PCRE library" +} + +src_compile() { + myconf="${myconf} \ + --disable-cgi \ + --enable-cli" + + php-sapi_src_compile +} + + +src_install() { + PHP_INSTALLTARGETS="install" + php-sapi_src_install + + einfo "Installing manpage" + doman sapi/cli/php.1 +} + +pkg_postinst() { + php-sapi_pkg_postinst + einfo "This is a CLI only build." + einfo "You cannot use it on a webserver." + + if [ -f "${ROOT}/root/.pearrc" -a "`md5sum ${ROOT}/root/.pearrc`" = "f0243f51b2457bc545158cf066e4e7a2 ${ROOT}/root/.pearrc" ]; then + einfo "Cleaning up an old PEAR install glitch" + mv ${ROOT}/root/.pearrc ${ROOT}/root/.pearrc.`date +%Y%m%d%H%M%S` + fi +} diff --git a/dev-php/php/php-4.4.0.ebuild b/dev-php/php/php-4.4.0.ebuild index 6a96e1c69793..3c0caba38675 100644 --- a/dev-php/php/php-4.4.0.ebuild +++ b/dev-php/php/php-4.4.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.4.0.ebuild,v 1.11 2005/08/16 04:07:37 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/php/php-4.4.0.ebuild,v 1.12 2005/10/29 22:16:13 chtekk Exp $ PHPSAPI="cli" inherit php-sapi eutils @@ -12,7 +12,7 @@ IUSE="" src_unpack() { php-sapi_src_unpack - [ "${ARCH}" == "amd64" ] && epatch ${FILESDIR}/php-4.3.4-amd64hack.diff + [ "${ARCH}" == "amd64" ] && epatch "${FILESDIR}/php-4.3.4-amd64hack.diff" } src_compile() { -- cgit v1.2.3-65-gdbad