Hello community,
here is the log from the commit of package php5
checked in at Thu Mar 22 19:23:31 CET 2007.
--------
--- php5/php5.changes 2007-01-30 11:16:26.000000000 +0100
+++ /mounts/work_src_done/STABLE/php5/php5.changes 2007-03-22 17:31:13.934802000 +0100
@@ -1,0 +2,65 @@
+Thu Mar 22 17:29:44 CET 2007 - mmarek@suse.de
+
+- fixed unpack() on big-endian 64bit (revert-phpbug38770.patch)
+- blacklist more env variables when safe_mode is on
+ (php5-config.patch)
+
+-------------------------------------------------------------------
+Sat Mar 17 14:00:00 CET 2007 - judas_iscariote
+
+- fix Requires of -devel package to include only what is really
+ needed for operation of the pecl tool as well the neccesary
+ headers to compile php extensions.
+- Fix MOPB 24 "PHP array_user_key_compare() Double DTOR
+ Vulnerability"
+- note that fix for MOPB 23 was included in the previous patchset.
+
+-------------------------------------------------------------------
+Wed Mar 14 14:00:00 CET 2007 - judas_iscariote
+
+- add security fixes for MOPB 20, 21 and 22.
+- RPM_BUILD_ROOT is never defined in %post.
+
+-------------------------------------------------------------------
+Fri Mar 11 14:00:00 CET 2007 - judas_iscariote
+
+- fix/workaround for php5-gd problem with typo3 [#236680]
+- add fix for MOPB-14-2007 PHP substr_compare() Information Leak
+ Vulnerability.
+- add secfix for import_request_variables() ancient problem, users
+ of suhosin extension are not affected.
+- Run the test suite here
+
+-------------------------------------------------------------------
+Tue Mar 06 14:00:00 CET 2007 - judas_iscariote
+
+- Update suhosin extension to version 0.9.18 fixing a session
+ problem.
+
+-------------------------------------------------------------------
+Mon Mar 05 14:00:00 CET 2007 - judas_iscariote
+
+- Update suhosin extension to version 0.9.17. see
+ http://www.hardened-php.net/suhosin/changelog.html for details.
+
+-------------------------------------------------------------------
+Thu Feb 15 14:00:00 CET 2007 - judas_iscariote
+
+- add t1lib support in php5-gd (10.3 and up only)
+- an off-by-one in str_replace may cause a crash.
+
+-------------------------------------------------------------------
+Wed Feb 08 14:00:00 CET 2007 - judas_iscariote
+
+- PHP 5.2.1. for a full list of changes see
+ http://www.php.net/ChangeLog-5.php#5.2.1
+- add Obsoletes for extensions we dont ship anymore
+
+-------------------------------------------------------------------
+Fri Feb 2 14:00:00 CET 2007 - judas_iscariote
+
+- fix getenv() modifing $_POST, breaks suhosin badly when
+ register_* is On and variables orde is "GPCS" (default).
+- change/remove obsoleted patches
+
+-------------------------------------------------------------------
Old:
----
php-5.2.0-save_path-secfix.patch
php-5.2.0.tar.bz2
php5-5.2.0-curl-cvs-fix.patch
php5-5.2.0-strcmp.patch
php5-ext-lib64again.patch
php5-filter.patch
php5-oldhat-phpinputdata-secfix.patch
php5-phpbug-39350.patch
php5-session-rgon-hijack.patch
php5-ze2-fixes.patch
suhosin-0.9.16.tar.bz2
suhosin-patch-5.2.0-0.9.6.2.patch.gz
New:
----
php-5.2.1-revert-phpbug38770.patch
php-5.2.1.tar.bz2
php5-importreqvars-secfix.patch
php5-MOPB-14-2007-secfix.patch
php5-MOPB-20-2007-secfix.patch
php5-MOPB-21-2007-secfix.patch
php5-MOPB-22-2007-secfix.patch
php5-MOPB-24-2007-secfix.patch
php5-really-norpath.patch
php5-warnings.patch
suhosin-0.9.18.tar.bz2
suhosin-patch-5.2.1-0.9.6.2.patch.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ php5.spec ++++++
--- /var/tmp/diff_new_pack.vY4081/_old 2007-03-22 19:03:48.000000000 +0100
+++ /var/tmp/diff_new_pack.vY4081/_new 2007-03-22 19:03:48.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package php5 (Version 5.2.0)
+# spec file for package php5 (Version 5.2.1)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,11 +11,10 @@
# norootforbuild
Name: php5
-%define suhosin_version 0.9.16
+%define suhosin_version 0.9.18
%define suhosin_patch_version 0.9.6.2
%define with_suhosin_patch 1
%define pkg_name php5
-%define with_libedit 1
%define with_spell 1
%if 0%{?suse_version} < 930
%define with_spell 0
@@ -40,13 +39,15 @@
BuildRequires: flex libgcrypt-devel rpm-devel
BuildRequires: libjpeg libjpeg-devel
%endif
-%if %{with_libedit}
BuildRequires: libedit-devel
-%endif
# use system PCRE and sqlite on 10.2 an up only, previous versions will not work.
%if 0%{?suse_version} > 1010
BuildRequires: pcre-devel sqlite-devel sqlite2-devel
%endif
+#support t1lib in gd in 10.3 or later
+%if 0%{?suse_version} > 1020
+BuildRequires: t1lib-devel
+%endif
%define extension_dir %{_libdir}/%{pkg_name}/extensions
%define peardir %{_datadir}/%{pkg_name}/PEAR
%define cgi_dir /srv/www/cgi-bin
@@ -63,17 +64,15 @@
%define apache2_serverroot %(%{apxs2} -q PREFIX)
###
###
-Version: 5.2.0
-Release: 26
+Version: 5.2.1
+Release: 1
License: Other uncritical OpenSource License
Group: Productivity/Networking/Web/Servers
Provides: php zend php-xml php-spl php-simplexml php-session php-pcre php-date php-reflection php-filter
-%if %{with_libedit}
-#bsd licensed CLI only
-Provides: php-readline
-%endif
Autoreqprov: on
PreReq: update-alternatives
+#extensions that are no longer here
+Obsoletes: php5-dbx php5-dio php5-fam php5-filepro php5-yp
Source0: php-%{version}.tar.bz2
Source1: php-suse-addons.tar.bz2
Source2: suhosin-%{suhosin_version}.tar.bz2
@@ -87,23 +86,22 @@
#home made hack to really build against libedit
Patch5: php5-really-with-libedit.patch
%if %{with_suhosin_patch}
-Patch6: suhosin-patch-5.2.0-%{suhosin_patch_version}.patch.gz
+Patch6: suhosin-patch-%{version}-%{suhosin_patch_version}.patch.gz
Patch7: suhosin-patch-fixes.patch
%endif
-Patch8: php5-phpbug-39350.patch
-# the following gotcha,well known since 2004,was recently fixed.
-# see http://blog.php-security.org/archives/45-PHP-5.2.0-and-allow_url_include.htm...
-Patch9: php5-oldhat-phpinputdata-secfix.patch
-# see phpbug#39320 and
-Patch10: php5-ze2-fixes.patch
-# see http://news.php.net/php.internals/26171 and 39358 and.. (pending bug number)
-Patch11: php5-filter.patch
-Patch12: php5-session-rgon-hijack.patch
-# it still forget lib64..
-Patch13: php5-ext-lib64again.patch
-Patch14: php5-5.2.0-curl-cvs-fix.patch
-Patch15: php5-5.2.0-strcmp.patch
-Patch16: php-%{version}-save_path-secfix.patch
+#bugs
+Patch8: php5-really-norpath.patch
+Patch9: php-5.2.1-revert-phpbug38770.patch
+#security fixes
+Patch10: php5-MOPB-14-2007-secfix.patch
+# see http://www.securityfocus.com/bid/22886
+Patch11: php5-importreqvars-secfix.patch
+Patch12: php5-MOPB-20-2007-secfix.patch
+Patch13: php5-MOPB-21-2007-secfix.patch
+Patch14: php5-MOPB-22-2007-secfix.patch
+Patch15: php5-MOPB-24-2007-secfix.patch
+# compiler warnings
+Patch16: php5-warnings.patch
URL: http://www.php.net
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Icon: php5.xpm
@@ -128,10 +126,10 @@
Provides: php-devel pecl
Summary: Include files of PHP5
Group: Development/Libraries/C and C++
-Requires: %{name} = %{version} autoconf automake libtool bison make gcc
-%if 0%{?suse_version} > 1010
-Requires: pcre-devel sqlite-devel sqlite2-devel
-%endif
+#this is required by the installed development headers
+Requires: %{name} = %{version} glibc-devel libxml2-devel expat
+#this is needed for "pecl" functionality
+Requires: autoconf automake libtool
Conflicts: php4-devel
%description devel
@@ -206,7 +204,7 @@
that have a look at the example archive sites and some of the other
resources available in the links section.
-Please refer to /usr/share/doc/packages/php4/README.FastCGI for
+Please refer to /usr/share/doc/packages/php5/README.FastCGI for
information on how to use this module.
@@ -733,6 +731,22 @@
See http://www.php.net/credits.php for more details
%endif
+%package readline
+Provides: php-readline
+Summary: PHP5 Extension Module
+Group: Productivity/Networking/Web/Servers
+Requires: %{name} = %{version} libedit
+
+%description readline
+This module provides readline support.
+
+
+
+Authors:
+--------
+ The PHP Group
+ See http://www.php.net/credits.php for more details
+
%package shmop
Provides: php-shmop
Summary: PHP5 Extension Module
@@ -1068,7 +1082,7 @@
%patch6 -p1
%patch7
%endif
-%patch8
+%patch8 -p1
%patch9
%patch10
%patch11
@@ -1081,6 +1095,8 @@
mkdir -p build-apache2
mkdir -p build-fastcgi/sapi/cgi/libfcgi
mkdir -p build-cli/ext/sqlite/libsqlite/src/
+# THis happends only with bison 1.875
+%if 0%{?suse_version} < 1010
# our bison seems to generate wrong parser, so use the pregenerated ones...
for sapi in apache2 fastcgi cli ; do
mkdir build-$sapi/Zend
@@ -1092,8 +1108,14 @@
Zend/zend_ini_parser.c \
build-$sapi/Zend
done
+%endif
%build
+# Force use of system libtool(when newer than the included)
+%if 0%{?suse_version} > 1000
+libtoolize --force --copy
+cat `aclocal --print-ac-dir`/libtool.m4 > build/libtool.m4
+%endif
#get rid of bundled libraries which are not used in 10.2 and later
%if 0%{?suse_version} > 1010
%{__rm} -rf ext/pcre/pcrelib ext/pdo_sqlite/sqlite
@@ -1107,7 +1129,7 @@
CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -D_GNU_SOURCE -pipe"
%if 0%{?suse_version} > 1000
CFLAGS="$CFLAGS -fstack-protector"
-CXXFLAGS="$CFLAGS -fstack-protector"
+CXXFLAGS="$CXXFLAGS -fstack-protector"
%endif
export CFLAGS
export CXXFLAGS
@@ -1148,7 +1170,9 @@
--enable-inline-optimization \
--disable-rpath \
--disable-static \
+ --enable-shared \
--program-suffix=5 \
+ --with-pic \
"$@"
# Some modules are builtin, reasons:
# - libxml can not be shared (and is needed by PEAR)
@@ -1201,13 +1225,15 @@
--with-bz2=shared \
--with-curl=shared \
--with-gd=shared \
- --enable-gd-jis-conv \
--enable-gd-native-ttf \
--with-xpm-dir=%{_x11prefix} \
--with-freetype-dir=%{_usr} \
--with-png-dir=%{_usr} \
--with-jpeg-dir=%{_usr} \
--with-zlib-dir=%{_usr} \
+%if 0%{?suse_version} > 1020
+ --with-t1lib=%{_usr} \
+%endif
--with-gettext=shared \
--with-gmp=shared \
--enable-hash=shared \
@@ -1218,9 +1244,7 @@
--enable-json=shared \
--with-ldap=shared \
--with-ldap-sasl=%{_usr} \
-%if %{with_libedit}
- --with-libedit=%{_usr} \
-%endif
+ --with-libedit=shared,%{_usr} \
--with-mcrypt=shared \
--with-mhash=shared \
--with-mysql=shared,%{_usr} \
@@ -1264,42 +1288,55 @@
--enable-suhosin=shared \
--disable-cgi
# things that currently do not compile:
-# gd:
-# --with-t1lib=%{_usr} \ (note: requires t1lib version 5 )
# extensions:
# --with-recode=shared \ error: recode extension can not be configured together with: imap mysql yaz
#disabled extensions
# --enable-embedded-mysqli \
+cd build-cli
+# Run tests, using the CLI SAPI
+export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
+unset TZ LANG LC_ALL
+if ! make test; then
+ set +x
+ for f in `find .. -name \*.diff -type f -print`; do
+ echo "TEST FAILURE: $f --"
+ cat "$f"
+ echo "-- $f result ends."
+ done
+ set -x
+ #exit 1
+fi
+unset NO_INTERACTION REPORT_EXIT_STATUS MALLOC_CHECK_
%install
# install function
Install()
{
pushd build-$1
- %{__make} install INSTALL_ROOT=$RPM_BUILD_ROOT PHP_PEAR_PHP_BIN=%{_bindir}/%{pkg_name}
+ %{__make} install INSTALL_ROOT=%{buildroot} PHP_PEAR_PHP_BIN=%{_bindir}/%{pkg_name}
popd
}
# do the actual installation
Install apache2
#need it for yast module
-mv $RPM_BUILD_ROOT%{apache2_libexecdir}/libphp5.so $RPM_BUILD_ROOT%{apache2_libexecdir}/mod_php5.so
+mv %{buildroot}%{apache2_libexecdir}/libphp5.so %{buildroot}%{apache2_libexecdir}/mod_php5.so
Install fastcgi
Install cli
# generate php.ini from php.ini-recommendedt:
-install -d -m 755 $RPM_BUILD_ROOT/%{php_sysconf}/conf.d
-install -d -m 755 $RPM_BUILD_ROOT/%{php_sysconf}/apache2
-install -d -m 755 $RPM_BUILD_ROOT/%{php_sysconf}/cli
-install -d -m 755 $RPM_BUILD_ROOT/%{php_sysconf}/fastcgi
+install -d -m 755 %{buildroot}/%{php_sysconf}/conf.d
+install -d -m 755 %{buildroot}/%{php_sysconf}/apache2
+install -d -m 755 %{buildroot}/%{php_sysconf}/cli
+install -d -m 755 %{buildroot}/%{php_sysconf}/fastcgi
sed "s=@extdir@=%{extension_dir}=" php.ini-recommended \
- > $RPM_BUILD_ROOT/%{php_sysconf}/apache2/php.ini
+ > %{buildroot}/%{php_sysconf}/apache2/php.ini
sed "s=@extdir@=%{extension_dir}=" php.ini-recommended \
| sed -r 's/^(html_errors|implicit_flush|max_execution_time|register_argc_argv)/;\1/' \
- > $RPM_BUILD_ROOT/%{php_sysconf}/cli/php.ini
+ > %{buildroot}/%{php_sysconf}/cli/php.ini
sed "s=@extdir@=%{extension_dir}=" php.ini-recommended \
- > $RPM_BUILD_ROOT/%{php_sysconf}/fastcgi/php.ini
+ > %{buildroot}/%{php_sysconf}/fastcgi/php.ini
# prepare configuration files for each extension
extern_modules=""
-for f in $RPM_BUILD_ROOT%{extension_dir}/*; do
+for f in %{buildroot}%{extension_dir}/*; do
if test ${f##*.} = a; then
rm $f
continue
@@ -1309,41 +1346,40 @@
fi
ext=${f##*/}
extern_modules="$extern_modules $ext"
- echo "; comment out next line to disable $ext extension in php" > $RPM_BUILD_ROOT/%{php_sysconf}/conf.d/$ext.ini
- echo "extension=$ext.so" >> $RPM_BUILD_ROOT/%{php_sysconf}/conf.d/$ext.ini
+ echo "; comment out next line to disable $ext extension in php" > %{buildroot}/%{php_sysconf}/conf.d/$ext.ini
+ echo "extension=$ext.so" >> %{buildroot}/%{php_sysconf}/conf.d/$ext.ini
done
#suhosin configuration
-install -m 644 %{S:3} $RPM_BUILD_ROOT/%{php_sysconf}/conf.d/suhosin.ini
+install -m 644 %{S:3} %{buildroot}/%{php_sysconf}/conf.d/suhosin.ini
# list of builtin modules
builtin_modules=`./build-cli/sapi/cli/php -m | egrep -v '^(\[.*)?$' | sort | tr '\n' ' '`
# update readme
sed "s=@EXTERN_MODULES@=$extern_modules=;s=@BUILTIN_MODULES@=$builtin_modules=" php-suse-addons/README.SUSE > README.SUSE
# apache configuration
-mkdir -p $RPM_BUILD_ROOT%{apache2_sysconfdir}/conf.d
-install -m 644 php-suse-addons/sysconfig.apache2 $RPM_BUILD_ROOT/%{apache2_sysconfdir}/conf.d/%{pkg_name}.conf
+mkdir -p %{buildroot}%{apache2_sysconfdir}/conf.d
+install -m 644 php-suse-addons/sysconfig.apache2 %{buildroot}/%{apache2_sysconfdir}/conf.d/%{pkg_name}.conf
# rename to php5
-pushd $RPM_BUILD_ROOT%{cgi_dir}
+pushd %{buildroot}%{cgi_dir}
#mv php php5
rm php-config5 phpize5
popd
-pushd $RPM_BUILD_ROOT/%{_bindir}
+pushd %{buildroot}/%{_bindir}
#mv php php5
mv pear pear5
mv pecl pecl5
popd
-#pushd $RPM_BUILD_ROOT/%{_mandir}/man1
+#pushd %{buildroot}/%{_mandir}/man1
#mv php.1 php5.1
#popd
# directory for sessions
-install -d $RPM_BUILD_ROOT/var/lib/%{pkg_name}
+install -d %{buildroot}/var/lib/%{pkg_name}
# documentation
mv sapi/cli/README README.CLI
mv sapi/cgi/README.FastCGI README.FastCGI
-rm -rf $RPM_BUILD_ROOT/{.channels,.depdb*,.filemap,.lock,usr/bin/peardev}
-install -d -m 0755 $RPM_BUILD_ROOT/%{peardir}/test
+rm -rf %{buildroot}/{.channels,.depdb*,.filemap,.lock,usr/bin/peardev}
+install -d -m 0755 %{buildroot}/%{peardir}/test
%post
-test -L ${RPM_BUILD_ROOT}%{_bindir}/php || rm -f ${RPM_BUILD_ROOT}%{_bindir}/php
update-alternatives --install %{_bindir}/php php %{_bindir}/php5 5 \
--slave %{_mandir}/man1/php.1.gz php.1 %{_mandir}/man1/php5.1.gz
update-alternatives --auto php
@@ -1354,7 +1390,6 @@
fi
%post pear
-test -L ${RPM_BUILD_ROOT}%{_bindir}/pear || rm -f ${RPM_BUILD_ROOT}%{_bindir}/pear
update-alternatives --install %{_bindir}/pear pear %{_bindir}/pear5 5
update-alternatives --auto pear
@@ -1365,17 +1400,14 @@
%post devel
#phpize
-test -L ${RPM_BUILD_ROOT}%{_bindir}/phpize || rm -f ${RPM_BUILD_ROOT}%{_bindir}/phpize
update-alternatives --install %{_bindir}/phpize phpize %{_bindir}/phpize5 5 \
--slave %{_mandir}/man1/phpize.1.gz phpize.1 %{_mandir}/man1/phpize5.1.gz
update-alternatives --auto phpize
#php-config
-test -L ${RPM_BUILD_ROOT}%{_bindir}/php-config || rm -f ${RPM_BUILD_ROOT}%{_bindir}/php-config
update-alternatives --install %{_bindir}/php-config php-config %{_bindir}/php-config5 5 \
--slave %{_mandir}/man1/phpize.1.gz php-config.1 %{_mandir}/man1/php-config5.1.gz
update-alternatives --auto php-config
#pecl
-test -L ${RPM_BUILD_ROOT}%{_bindir}/pecl || rm -f ${RPM_BUILD_ROOT}%{_bindir}/pecl
update-alternatives --install %{_bindir}/pecl pecl %{_bindir}/pecl5 5
update-alternatives --auto pecl
@@ -1393,7 +1425,7 @@
fi
%clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%files
%defattr(-, root, root)
@@ -1598,6 +1630,11 @@
%config(noreplace) %{php_sysconf}/conf.d/pspell.ini
%endif
+%files readline
+%defattr(644,root,root,755)
+%{extension_dir}/readline.so
+%config(noreplace) %{php_sysconf}/conf.d/readline.ini
+
%files shmop
%defattr(644,root,root,755)
%{extension_dir}/shmop.so
@@ -1690,7 +1727,45 @@
%{extension_dir}/zlib.so
%config(noreplace) %{php_sysconf}/conf.d/zlib.ini
-%changelog -n php5
+%changelog
+* Thu Mar 22 2007 - mmarek@suse.de
+- fixed unpack() on big-endian 64bit (revert-phpbug38770.patch)
+- blacklist more env variables when safe_mode is on
+ (php5-config.patch)
+ Sat Mar 17 14:00:00 CET 2007 - judas_iscariote
+- fix Requires of -devel package to include only what is really
+ needed for operation of the pecl tool as well the neccesary
+ headers to compile php extensions.
+- Fix MOPB 24 "PHP array_user_key_compare() Double DTOR
+ Vulnerability"
+- note that fix for MOPB 23 was included in the previous patchset.
+ Wed Mar 14 14:00:00 CET 2007 - judas_iscariote
+- add security fixes for MOPB 20, 21 and 22.
+- RPM_BUILD_ROOT is never defined in %%post.
+ Fri Mar 11 14:00:00 CET 2007 - judas_iscariote
+- fix/workaround for php5-gd problem with typo3 [#236680]
+- add fix for MOPB-14-2007 PHP substr_compare() Information Leak
+ Vulnerability.
+- add secfix for import_request_variables() ancient problem, users
+ of suhosin extension are not affected.
+- Run the test suite here
+ Tue Mar 06 14:00:00 CET 2007 - judas_iscariote
+- Update suhosin extension to version 0.9.18 fixing a session
+ problem.
+ Mon Mar 05 14:00:00 CET 2007 - judas_iscariote
+- Update suhosin extension to version 0.9.17. see
+ http://www.hardened-php.net/suhosin/changelog.html for details.
+ Thu Feb 15 14:00:00 CET 2007 - judas_iscariote
+- add t1lib support in php5-gd (10.3 and up only)
+- an off-by-one in str_replace may cause a crash.
+ Wed Feb 08 14:00:00 CET 2007 - judas_iscariote
+- PHP 5.2.1. for a full list of changes see
+ http://www.php.net/ChangeLog-5.php#5.2.1
+- add Obsoletes for extensions we dont ship anymore
+ Fri Feb 2 14:00:00 CET 2007 - judas_iscariote
+- fix getenv() modifing $_POST, breaks suhosin badly when
+ register_* is On and variables orde is "GPCS" (default).
+- change/remove obsoleted patches
* Tue Jan 30 2007 - anosek@suse.cz
- synced with BuildService
* file "session_mm_apache2handler0.sem" written at boot
++++++ php-5.2.1-revert-phpbug38770.patch ++++++
# see http://bugs.php.net/bug.php?id=40894
# in short 5.2.1 breaks unpack on big-endian 64bit
--- ext/standard/pack.c
+++ ext/standard/pack.c
@@ -753,16 +753,14 @@ PHP_FUNCTION(unpack)
case 'i':
case 'I': {
- long v = 0;
+ long v;
int issigned = 0;
if (type == 'i') {
issigned = input[inputpos + (machine_little_endian ? (sizeof(int) - 1) : 0)] & 0x80;
- } else if (sizeof(long) > 4 && (input[inputpos + machine_endian_long_map[3]] & 0x80) == 0x80) {
- v = ~INT_MAX;
- }
+ }
- v |= php_unpack(&input[inputpos], sizeof(int), issigned, int_map);
+ v = php_unpack(&input[inputpos], sizeof(int), issigned, int_map);
add_assoc_long(return_value, n, v);
break;
}
@@ -773,7 +771,7 @@ PHP_FUNCTION(unpack)
case 'V': {
int issigned = 0;
int *map = machine_endian_long_map;
- long v = 0;
+ long v;
if (type == 'l') {
issigned = input[inputpos + (machine_little_endian ? 3 : 0)] & 0x80;
@@ -783,11 +781,7 @@ PHP_FUNCTION(unpack)
map = little_endian_long_map;
}
- if (sizeof(long) > 4 && (input[inputpos + machine_endian_long_map[3]] & 0x80) == 0x80) {
- v = ~INT_MAX;
- }
-
- v |= php_unpack(&input[inputpos], 4, issigned, map);
+ v = php_unpack(&input[inputpos], 4, issigned, map);
add_assoc_long(return_value, n, v);
break;
}
++++++ php-5.2.0.tar.bz2 -> php-5.2.1.tar.bz2 ++++++
php5/php-5.2.0.tar.bz2 /mounts/work_src_done/STABLE/php5/php-5.2.1.tar.bz2 differ: byte 11, line 1
++++++ php5-config.patch ++++++
--- /var/tmp/diff_new_pack.vY4081/_old 2007-03-22 19:03:48.000000000 +0100
+++ /var/tmp/diff_new_pack.vY4081/_new 2007-03-22 19:03:48.000000000 +0100
@@ -1,11 +1,17 @@
-Index: php.ini-recommended
-===================================================================
-RCS file: /repository/php-src/php.ini-recommended,v
-retrieving revision 1.179.2.11.2.12
-diff -u -r1.179.2.11.2.12 php.ini-recommended
---- php.ini-recommended 14 Oct 2006 15:06:11 -0000 1.179.2.11.2.12
-+++ php.ini-recommended 3 Jan 2007 07:44:13 -0000
-@@ -390,7 +390,7 @@
+--- php.ini-recommended
++++ php.ini-recommended
+@@ -241,7 +241,9 @@ safe_mode_allowed_env_vars = PHP_
+ ; This directive contains a comma-delimited list of environment variables that
+ ; the end user won't be able to change using putenv(). These variables will be
+ ; protected even if safe_mode_allowed_env_vars is set to allow to change them.
+-safe_mode_protected_env_vars = LD_LIBRARY_PATH
++; the default is the same list ld.so uses when starting a setuid binary
++safe_mode_protected_env_vars = GCONV_PATH,GETCONF_DIR,HOSTALIASES,LD_AUDIT,LD_DEBUG,LD_DEBUG_OUTPUT,LD_DYNAMIC_WEAK,LD_LIBRARY_PATH,LD_ORIGIN_PATH,LD_PRELOAD,LD_PROFILE,LD_SHOW_AUXV,LD_USE_LOAD_BIAS,LOCALDOMAIN,LOCPATH,MALLOC_TRACE,NLSPATH,RESOLV_HOST_CONF,RES_OPTIONS,TMPDIR,TZDIR
++
+
+ ; open_basedir, if set, limits all file operations to the defined directory
+ ; and below. This directive makes most sense if used in a per-directory
+@@ -390,7 +392,7 @@ track_errors = Off
; Disable the inclusion of HTML tags in error messages.
; Note: Never use this feature for production boxes.
@@ -14,19 +20,16 @@
; If html_errors is set On PHP produces clickable error messages that direct
; to a page describing the error or function causing the error in detail.
-@@ -500,10 +500,7 @@
+@@ -500,7 +502,7 @@ default_mimetype = "text/html"
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
-;include_path = ".:/php/includes"
--;
--; Windows: "\path1;\path2"
--;include_path = ".;c:\php\includes"
+include_path = ".:/usr/share/php5:/usr/share/php5/PEAR"
-
- ; The root of the PHP pages, used only if nonempty.
- ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
-@@ -517,12 +514,12 @@
+ ;
+ ; Windows: "\path1;\path2"
+ ;include_path = ".;c:\php\includes"
+@@ -517,12 +519,12 @@ doc_root =
user_dir =
; Directory in which the loadable extensions (modules) reside.
@@ -41,7 +44,7 @@
; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers. Left undefined, PHP turns this on by default. You can
-@@ -567,7 +564,7 @@
+@@ -567,7 +569,7 @@ file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
@@ -50,15 +53,7 @@
; Maximum allowed size for uploaded files.
upload_max_filesize = 2M
-@@ -581,6 +578,7 @@
- allow_url_fopen = On
-
- ; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
-+
- allow_url_include = Off
-
- ; Define the anonymous ftp password (your email address)
-@@ -599,70 +597,6 @@
+@@ -599,81 +601,6 @@ default_socket_timeout = 60
; fgets() and file() will work regardless of the source of the file.
; auto_detect_line_endings = Off
@@ -91,45 +86,56 @@
-; extension folders as well as the separate PECL DLL download (PHP 5).
-; Be sure to appropriately set the extension_dir directive.
-
--;extension=php_mbstring.dll
-;extension=php_bz2.dll
-;extension=php_curl.dll
-;extension=php_dba.dll
-;extension=php_dbase.dll
-;extension=php_exif.dll
-;extension=php_fdf.dll
--;extension=php_filepro.dll
-;extension=php_gd2.dll
-;extension=php_gettext.dll
+-;extension=php_gmp.dll
-;extension=php_ifx.dll
-;extension=php_imap.dll
-;extension=php_interbase.dll
-;extension=php_ldap.dll
+-;extension=php_mbstring.dll
-;extension=php_mcrypt.dll
-;extension=php_mhash.dll
-;extension=php_mime_magic.dll
-;extension=php_ming.dll
--;extension=php_mssql.dll
-;extension=php_msql.dll
+-;extension=php_mssql.dll
-;extension=php_mysql.dll
+-;extension=php_mysqli.dll
-;extension=php_oci8.dll
-;extension=php_openssl.dll
--;extension=php_oracle.dll
+-;extension=php_pdo.dll
+-;extension=php_pdo_firebird.dll
+-;extension=php_pdo_mssql.dll
+-;extension=php_pdo_mysql.dll
+-;extension=php_pdo_oci.dll
+-;extension=php_pdo_oci8.dll
+-;extension=php_pdo_odbc.dll
+-;extension=php_pdo_pgsql.dll
+-;extension=php_pdo_sqlite.dll
-;extension=php_pgsql.dll
+-;extension=php_pspell.dll
-;extension=php_shmop.dll
-;extension=php_snmp.dll
+-;extension=php_soap.dll
-;extension=php_sockets.dll
-;extension=php_sqlite.dll
-;extension=php_sybase_ct.dll
-;extension=php_tidy.dll
-;extension=php_xmlrpc.dll
-;extension=php_xsl.dll
--
+-;extension=php_zip.dll
-
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
-@@ -704,13 +638,6 @@
+@@ -715,12 +642,6 @@ default_socket_timeout = 60
define_syslog_variables = Off
[mail function]
@@ -139,11 +145,10 @@
-
-; For Win32 only.
-;sendmail_from = me@example.com
--
+
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
-
-@@ -728,7 +655,7 @@
+@@ -739,7 +660,7 @@ sql.safe_mode = Off
;odbc.default_pw = Not yet implemented
; Allow or prevent persistent links.
@@ -152,7 +157,7 @@
; Check that a connection is still valid before reuse.
odbc.check_persistent = On
-@@ -750,7 +677,7 @@
+@@ -761,7 +682,7 @@ odbc.defaultbinmode = 1
[MySQL]
; Allow or prevent persistent links.
@@ -161,7 +166,7 @@
; Maximum number of persistent links. -1 means no limit.
mysql.max_persistent = -1
-@@ -819,19 +746,9 @@
+@@ -830,50 +751,9 @@ mysqli.default_pw =
; Allow or prevent reconnect
mysqli.reconnect = Off
@@ -175,6 +180,37 @@
-; Maximum number of links (persistent+non persistent). -1 means no limit.
-msql.max_links = -1
-
+-[OCI8]
+-; enables privileged connections using external credentials (OCI_SYSOPER, OCI_SYSDBA)
+-;oci8.privileged_connect = Off
+-
+-; Connection: The maximum number of persistent OCI8 connections per
+-; process. Using -1 means no limit.
+-;oci8.max_persistent = -1
+-
+-; Connection: The maximum number of seconds a process is allowed to
+-; maintain an idle persistent connection. Using -1 means idle
+-; persistent connections will be maintained forever.
+-;oci8.persistent_timeout = -1
+-
+-; Connection: The number of seconds that must pass before issuing a
+-; ping during oci_pconnect() to check the connection validity. When
+-; set to 0, each oci_pconnect() will cause a ping. Using -1 disables
+-; pings completely.
+-;oci8.ping_interval = 60
+-
+-; Tuning: This option enables statement caching, and specifies how
+-; many statements to cache. Using 0 disables statement caching.
+-;oci8.statement_cache_size = 20
+-
+-; Tuning: Enables statement prefetching and sets the default number of
+-; rows that will be fetched automatically after statement execution.
+-;oci8.default_prefetch = 10
+-
+-; Compatibility. Using On means oci_close() will not close
+-; oci_connect() and oci_new_connect() connections.
+-;oci8.old_oci_close_semantics = Off
+-
[PostgresSQL]
; Allow or prevent persistent links.
-pgsql.allow_persistent = On
@@ -182,7 +218,7 @@
; Detect broken persistent links always with pg_pconnect().
; Auto reset feature requires a little overheads.
-@@ -851,46 +768,6 @@
+@@ -893,47 +773,6 @@ pgsql.ignore_notice = 0
; Unless pgsql.ignore_notice=0, module cannot log notice message.
pgsql.log_notice = 0
@@ -226,10 +262,11 @@
-
-; Minimum client message severity to display.
-sybct.min_client_severity = 10
-
+-
[bcmath]
; Number of decimal digits for all bcmath functions.
-@@ -899,42 +776,6 @@
+ bcmath.scale = 0
+@@ -941,43 +780,6 @@ bcmath.scale = 0
[browscap]
;browscap = extra/browscap.ini
@@ -269,10 +306,11 @@
-; NULL's are returned as empty strings, unless this is set to 1. In that case,
-; NULL's are returned as string 'NULL'.
-ifx.nullformat = 0
-
+-
[Session]
; Handler used to store/retrieve data.
-@@ -966,7 +807,7 @@
+ session.save_handler = files
+@@ -1008,7 +810,7 @@ session.save_handler = files
;
; where MODE is the octal representation of the mode. Note that this
; does not overwrite the process's umask.
@@ -281,7 +319,7 @@
; Whether to use cookies.
session.use_cookies = 1
-@@ -975,7 +816,7 @@
+@@ -1017,7 +819,7 @@ session.use_cookies = 1
; This option enables administrators to make their users invulnerable to
; attacks which involve passing session ids in URLs; defaults to 0.
@@ -290,16 +328,16 @@
; Name of the session (used as cookie name).
session.name = PHPSESSID
-@@ -993,7 +834,7 @@
+@@ -1035,7 +837,7 @@ session.cookie_path = /
session.cookie_domain =
; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript.
-session.cookie_httponly =
-+session.cookie_httponly = 1
++session.cookie_httponly = 1
; Handler used to serialize data. php is the standard serializer of PHP.
session.serialize_handler = php
-@@ -1064,7 +905,7 @@
+@@ -1106,7 +908,7 @@ session.use_trans_sid = 0
; Select a hash function
; 0: MD5 (128 bits)
; 1: SHA-1 (160 bits)
@@ -308,7 +346,7 @@
; Define how many bits are stored in each character when converting
; the binary hash data to something readable.
-@@ -1081,57 +922,6 @@
+@@ -1123,58 +925,6 @@ session.hash_bits_per_character = 5
; Note that all valid entries require a "=", even if no value follows.
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
@@ -363,6 +401,48 @@
-; If empty or not set the client charset from freetds.comf is used
-; This is only used when compiled with FreeTDS
-;mssql.charset = "ISO-8859-1"
-
+-
[Assertion]
; Assert(expr); active by default.
+ ;assert.active = On
+@@ -1192,18 +942,6 @@ mssql.secure_connection = Off
+ ; error_reporting(0) around the eval().
+ ;assert.quiet_eval = 0
+
+-[COM]
+-; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs
+-;com.typelib_file =
+-; allow Distributed-COM calls
+-;com.allow_dcom = true
+-; autoregister constants of a components typlib on com_load()
+-;com.autoregister_typelib = true
+-; register constants casesensitive
+-;com.autoregister_casesensitive = false
+-; show warnings on duplicate constant registrations
+-;com.autoregister_verbose = true
+-
+ [mbstring]
+ ; language for internal character representation.
+ ;mbstring.language = Japanese
+@@ -1248,21 +986,6 @@ mssql.secure_connection = Off
+ ; enable strict encoding detection.
+ ;mbstring.strict_encoding = Off
+
+-[FrontBase]
+-;fbsql.allow_persistent = On
+-;fbsql.autocommit = On
+-;fbsql.show_timestamp_decimals = Off
+-;fbsql.default_database =
+-;fbsql.default_database_password =
+-;fbsql.default_host =
+-;fbsql.default_password =
+-;fbsql.default_user = "_SYSTEM"
+-;fbsql.generate_warnings = Off
+-;fbsql.max_connections = 128
+-;fbsql.max_links = 128
+-;fbsql.max_persistent = -1
+-;fbsql.max_results = 128
+-
+ [gd]
+ ; Tell the jpeg decode to libjpeg warnings and try to create
+ ; a gd image. The warning will then be displayed as notices
++++++ php5-importreqvars-secfix.patch ++++++
Index: ext/standard/basic_functions.c
===================================================================
RCS file: /repository/php-src/ext/standard/basic_functions.c,v
retrieving revision 1.725.2.31.2.39
retrieving revision 1.725.2.31.2.47
diff -u -r1.725.2.31.2.39 -r1.725.2.31.2.47
--- ext/standard/basic_functions.c 1 Jan 2007 09:36:08 -0000 1.725.2.31.2.39
+++ ext/standard/basic_functions.c 10 Mar 2007 19:20:16 -0000 1.725.2.31.2.47
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.725.2.31.2.39 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.47 2007/03/10 19:20:16 iliaa Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -3851,6 +3851,10 @@
# if HAVE_UNSETENV
unsetenv(pe->key);
# elif defined(PHP_WIN32)
+ char *del_string = emalloc(pe->key_len+2);
+ snprintf(del_string, pe->key_len+2, "%s=", pe->key);
+ putenv(del_string);
+ efree(del_string);
SetEnvironmentVariable(pe->key, NULL);
# else
char **env;
@@ -4442,7 +4446,7 @@
if (!strncmp(*env, pe.key, pe.key_len) && (*env)[pe.key_len] == '=') { /* found it */
#if defined(PHP_WIN32)
/* must copy previous value because MSVCRT's putenv can free the string without notice */
- pe.previous_value = estrndup(*env, 1024);
+ pe.previous_value = estrdup(*env);
#else
pe.previous_value = *env;
#endif
@@ -6126,6 +6130,12 @@
}
}
+ if (Z_TYPE_P(hash) != IS_ARRAY) {
+ zval_dtor(hash);
+ INIT_PZVAL(hash);
+ array_init(hash);
+ }
+
ALLOC_ZVAL(element);
*element = *arg2;
zval_copy_ctor(element);
@@ -6235,6 +6245,33 @@
} else if (!strcmp(hash_key->arKey, "GLOBALS")) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempted GLOBALS variable overwrite.");
return 0;
+ } else if (*hash_key->arKey == '_' &&
+ (
+ !strcmp(hash_key->arKey, "_GET") ||
+ !strcmp(hash_key->arKey, "_POST") ||
+ !strcmp(hash_key->arKey, "_COOKIE") ||
+ !strcmp(hash_key->arKey, "_ENV") ||
+ !strcmp(hash_key->arKey, "_SERVER") ||
+ !strcmp(hash_key->arKey, "_SESSION") ||
+ !strcmp(hash_key->arKey, "_FILES") ||
+ !strcmp(hash_key->arKey, "_REQUEST")
+ )
+ ) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempted super-global (%s) variable overwrite.", hash_key->arKey);
+ return 0;
+ } else if (*hash_key->arKey == 'H' &&
+ (
+ !strcmp(hash_key->arKey, "HTTP_POST_VARS") ||
+ !strcmp(hash_key->arKey, "HTTP_GET_VARS") ||
+ !strcmp(hash_key->arKey, "HTTP_COOKIE_VARS") ||
+ !strcmp(hash_key->arKey, "HTTP_ENV_VARS") ||
+ !strcmp(hash_key->arKey, "HTTP_SERVER_VARS") ||
+ !strcmp(hash_key->arKey, "HTTP_RAW_POST_DATA") ||
+ !strcmp(hash_key->arKey, "HTTP_POST_FILES")
+ )
+ ) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempted long input array (%s) overwrite.", hash_key->arKey);
+ return 0;
}
}
++++++ php5-MOPB-14-2007-secfix.patch ++++++
++++ 729 lines (skipped)
++++++ php5-MOPB-20-2007-secfix.patch ++++++
Index: ext/zip/zip_stream.c
===================================================================
RCS file: /repository/php-src/ext/zip/zip_stream.c,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- ext/zip/zip_stream.c 23 Dec 2006 23:28:39 -0000 1.1.2.3
+++ ext/zip/zip_stream.c 14 Mar 2007 03:50:18 -0000 1.1.2.4
@@ -1,4 +1,4 @@
-/* $Id: zip_stream.c,v 1.1.2.3 2006/12/23 23:28:39 iliaa Exp $ */
+/* $Id: zip_stream.c,v 1.1.2.4 2007/03/14 03:50:18 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@@ -112,6 +112,10 @@
}
if (filename) {
+ if ((PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename TSRMLS_CC)) {
+ return NULL;
+ }
+
/* duplicate to make the stream za independent (esp. for MSHUTDOWN) */
stream_za = zip_open(filename, ZIP_CREATE, &err);
if (!stream_za) {
@@ -189,6 +193,11 @@
php_basename(path, path_len - fragment_len, NULL, 0, &file_basename, &file_basename_len TSRMLS_CC);
fragment++;
+ if ((PG(safe_mode) && (!php_checkuid(file_dirname, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(file_dirname TSRMLS_CC)) {
+ efree(file_basename);
+ return NULL;
+ }
+
za = zip_open(file_dirname, ZIP_CREATE, &err);
if (za) {
zf = zip_fopen(za, fragment, 0);
++++++ php5-MOPB-21-2007-secfix.patch ++++++
Index: ext/bz2/bz2.c
===================================================================
RCS file: /repository/php-src/ext/bz2/bz2.c,v
retrieving revision 1.14.2.3.2.10
retrieving revision 1.14.2.3.2.12
diff -u -r1.14.2.3.2.10 -r1.14.2.3.2.12
--- ext/bz2/bz2.c 1 Jan 2007 09:35:48 -0000 1.14.2.3.2.10
+++ ext/bz2/bz2.c 14 Mar 2007 03:50:18 -0000 1.14.2.3.2.12
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: bz2.c,v 1.14.2.3.2.10 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: bz2.c,v 1.14.2.3.2.12 2007/03/14 03:50:18 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -225,6 +225,10 @@
#else
path_copy = path;
#endif
+
+ if ((PG(safe_mode) && (!php_checkuid(path_copy, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(path_copy TSRMLS_CC)) {
+ return NULL;
+ }
/* try and open it directly first */
bz_file = BZ2_bzopen(path_copy, mode);
@@ -236,7 +240,7 @@
if (bz_file == NULL) {
/* that didn't work, so try and get something from the network/wrapper */
- stream = php_stream_open_wrapper(path, mode, options | STREAM_WILL_CAST, opened_path);
+ stream = php_stream_open_wrapper(path, mode, options | STREAM_WILL_CAST | ENFORCE_SAFE_MODE, opened_path);
if (stream) {
int fd;
++++++ php5-MOPB-22-2007-secfix.patch ++++++
Index: ext/session/session.c
===================================================================
RCS file: /repository/php-src/ext/session/session.c,v
retrieving revision 1.417.2.8.2.26
retrieving revision 1.417.2.8.2.32
diff -u -r1.417.2.8.2.26 -r1.417.2.8.2.32
--- ext/session/session.c 10 Jan 2007 07:04:49 -0000 1.417.2.8.2.26
+++ ext/session/session.c 14 Mar 2007 19:37:07 -0000 1.417.2.8.2.32
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: session.c,v 1.417.2.8.2.26 2007/01/10 07:04:49 dmitry Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.32 2007/03/14 19:37:07 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -478,7 +478,7 @@
zval **tmp;
namelen = *p & (~PS_BIN_UNDEF);
- if (namelen > PS_BIN_MAX || (p + namelen) >= endptr) {
+ if (namelen < 0 || namelen > PS_BIN_MAX || (p + namelen) >= endptr) {
return FAILURE;
}
@@ -731,10 +731,8 @@
remote_addr = Z_STRVAL_PP(token);
}
- buf = emalloc(100);
-
/* maximum 15+19+19+10 bytes */
- sprintf(buf, "%.15s%ld%ld%0.8F", remote_addr ? remote_addr : "",
+ spprintf(&buf, 0, "%.15s%ld%ld%0.8F", remote_addr ? remote_addr : "",
tv.tv_sec, (long int)tv.tv_usec, php_combined_lcg(TSRMLS_C) * 10);
switch (PS(hash_func)) {
@@ -848,6 +846,7 @@
} else if (PS(invalid_session_id)) { /* address instances where the session read fails due to an invalid id */
PS(invalid_session_id) = 0;
efree(PS(id));
+ PS(id) = NULL;
goto new_session;
}
}
@@ -952,7 +951,7 @@
php_gmtime_r(when, &tm);
- n = sprintf(buf, "%s, %02d %s %d %02d:%02d:%02d GMT", /* SAFE */
+ n = slprintf(buf, sizeof(buf), "%s, %02d %s %d %02d:%02d:%02d GMT", /* SAFE */
week_days[tm.tm_wday], tm.tm_mday,
month_names[tm.tm_mon], tm.tm_year + 1900,
tm.tm_hour, tm.tm_min,
@@ -997,7 +996,7 @@
strcpy_gmt(buf + sizeof(EXPIRES) - 1, &now);
ADD_HEADER(buf);
- sprintf(buf, "Cache-Control: public, max-age=%ld", PS(cache_expire) * 60); /* SAFE */
+ snprintf(buf, sizeof(buf) , "Cache-Control: public, max-age=%ld", PS(cache_expire) * 60); /* SAFE */
ADD_HEADER(buf);
last_modified(TSRMLS_C);
@@ -1007,7 +1006,7 @@
{
char buf[MAX_STR + 1];
- sprintf(buf, "Cache-Control: private, max-age=%ld, pre-check=%ld", PS(cache_expire) * 60, PS(cache_expire) * 60); /* SAFE */
+ snprintf(buf, sizeof(buf), "Cache-Control: private, max-age=%ld, pre-check=%ld", PS(cache_expire) * 60, PS(cache_expire) * 60); /* SAFE */
ADD_HEADER(buf);
last_modified(TSRMLS_C);
@@ -1577,6 +1576,7 @@
RETURN_FALSE;
}
efree(PS(id));
+ PS(id) = NULL;
}
PS(id) = PS(mod)->s_create_sid(&PS(mod_data), NULL TSRMLS_CC);
++++++ php5-MOPB-24-2007-secfix.patch ++++++
Index: ext/standard/array.c
===================================================================
RCS file: /repository/php-src/ext/standard/array.c,v
retrieving revision 1.308.2.21.2.23
retrieving revision 1.308.2.21.2.25
diff -u -r1.308.2.21.2.23 -r1.308.2.21.2.25
--- ext/standard/array.c 22 Jan 2007 08:17:26 -0000 1.308.2.21.2.23
+++ ext/standard/array.c 16 Mar 2007 19:38:58 -0000 1.308.2.21.2.25
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.308.2.21.2.23 2007/01/22 08:17:26 tony2001 Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.25 2007/03/16 19:38:58 stas Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -703,40 +703,40 @@
{
Bucket *f;
Bucket *s;
- zval key1, key2;
+ zval *key1, *key2;
zval *args[2];
zval retval;
int status;
- args[0] = &key1;
- args[1] = &key2;
- INIT_PZVAL(&key1);
- INIT_PZVAL(&key2);
+ ALLOC_INIT_ZVAL(key1);
+ ALLOC_INIT_ZVAL(key2);
+ args[0] = key1;
+ args[1] = key2;
f = *((Bucket **) a);
s = *((Bucket **) b);
if (f->nKeyLength) {
- Z_STRVAL(key1) = estrndup(f->arKey, f->nKeyLength-1);
- Z_STRLEN(key1) = f->nKeyLength-1;
- Z_TYPE(key1) = IS_STRING;
+ Z_STRVAL_P(key1) = estrndup(f->arKey, f->nKeyLength-1);
+ Z_STRLEN_P(key1) = f->nKeyLength-1;
+ Z_TYPE_P(key1) = IS_STRING;
} else {
- Z_LVAL(key1) = f->h;
- Z_TYPE(key1) = IS_LONG;
+ Z_LVAL_P(key1) = f->h;
+ Z_TYPE_P(key1) = IS_LONG;
}
if (s->nKeyLength) {
- Z_STRVAL(key2) = estrndup(s->arKey, s->nKeyLength-1);
- Z_STRLEN(key2) = s->nKeyLength-1;
- Z_TYPE(key2) = IS_STRING;
+ Z_STRVAL_P(key2) = estrndup(s->arKey, s->nKeyLength-1);
+ Z_STRLEN_P(key2) = s->nKeyLength-1;
+ Z_TYPE_P(key2) = IS_STRING;
} else {
- Z_LVAL(key2) = s->h;
- Z_TYPE(key2) = IS_LONG;
+ Z_LVAL_P(key2) = s->h;
+ Z_TYPE_P(key2) = IS_LONG;
}
status = call_user_function(EG(function_table), NULL, *BG(user_compare_func_name), &retval, 2, args TSRMLS_CC);
- zval_dtor(&key1);
- zval_dtor(&key2);
+ zval_ptr_dtor(&key1);
+ zval_ptr_dtor(&key2);
if (status == SUCCESS) {
convert_to_long(&retval);
@@ -4077,10 +4077,8 @@
while (zend_hash_get_current_data_ex(htbl, (void **)&operand, &pos) == SUCCESS) {
if (result) {
zend_fcall_info fci;
-
args[0] = &result;
args[1] = operand;
-
fci.size = sizeof(fci);
fci.function_table = EG(function_table);
fci.function_name = *callback;
@@ -4106,7 +4104,7 @@
zend_hash_move_forward_ex(htbl, &pos);
}
- RETVAL_ZVAL(result, 0, 1);
+ RETVAL_ZVAL(result, 1, 1);
}
/* }}} */
++++++ php5-php-config.patch ++++++
--- /var/tmp/diff_new_pack.vY4081/_old 2007-03-22 19:03:48.000000000 +0100
+++ /var/tmp/diff_new_pack.vY4081/_new 2007-03-22 19:03:48.000000000 +0100
@@ -1,7 +1,10 @@
Index: scripts/php-config.in
-================================================================================
---- scripts/php-config.in
-+++ scripts/php-config.in
+===================================================================
+RCS file: /repository/php-src/scripts/php-config.in,v
+retrieving revision 1.3.2.2.2.2
+diff -u -r1.3.2.2.2.2 php-config.in
+--- scripts/php-config.in 27 Jul 2006 08:53:16 -0000 1.3.2.2.2.2
++++ scripts/php-config.in 14 Aug 2006 04:16:34 -0000
@@ -4,7 +4,7 @@
exec_prefix="@exec_prefix@"
version="@PHP_VERSION@"
++++++ php5-really-norpath.patch ++++++
Really don't enable any RPATHs if --disable-rpath is given.
--- php-5.0.4/acinclude.m4.norpath
+++ php-5.0.4/acinclude.m4
@@ -833,6 +833,7 @@
dnl internal, don't use
AC_DEFUN([_PHP_ADD_LIBPATH_GLOBAL],[
PHP_RUN_ONCE(LIBPATH, $1, [
+ test "x$PHP_RPATH" != "xno" &&
test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$1"
LDFLAGS="$LDFLAGS -L$1"
PHP_RPATHS="$PHP_RPATHS $1"
@@ -852,7 +853,11 @@
_PHP_ADD_LIBPATH_GLOBAL([$ai_p])
],[
if test "$ext_shared" = "yes"; then
+ if test "x$PHP_RPATH" = "xno"; then
+ $2="-L$ai_p [$]$2"
+ else
$2="$ld_runpath_switch$ai_p -L$ai_p [$]$2"
+ fi
else
_PHP_ADD_LIBPATH_GLOBAL([$ai_p])
fi
++++++ php5-really-with-libedit.patch ++++++
--- /var/tmp/diff_new_pack.vY4081/_old 2007-03-22 19:03:48.000000000 +0100
+++ /var/tmp/diff_new_pack.vY4081/_new 2007-03-22 19:03:48.000000000 +0100
@@ -1,7 +1,10 @@
Index: ext/readline/config.m4
-================================================================================
---- ext/readline/config.m4
-+++ ext/readline/config.m4
+===================================================================
+RCS file: /repository/php-src/ext/readline/config.m4,v
+retrieving revision 1.25.2.3
+diff -u -r1.25.2.3 config.m4
+--- ext/readline/config.m4 28 Nov 2005 23:04:01 -0000 1.25.2.3
++++ ext/readline/config.m4 17 Aug 2006 22:46:53 -0000
@@ -64,7 +64,7 @@
elif test "$PHP_LIBEDIT" != "no"; then
@@ -11,8 +14,13 @@
done
if test -z "$LIBEDIT_DIR"; then
---- ext/readline/readline.c
-+++ ext/readline/readline.c
+Index: ext/readline/readline.c
+===================================================================
+RCS file: /repository/php-src/ext/readline/readline.c,v
+retrieving revision 1.42.2.3
+diff -u -r1.42.2.3 readline.c
+--- ext/readline/readline.c 1 Jan 2006 12:50:12 -0000 1.42.2.3
++++ ext/readline/readline.c 17 Aug 2006 22:46:53 -0000
@@ -33,9 +33,11 @@
#define rl_completion_matches completion_matches
#endif
@@ -26,8 +34,13 @@
#endif
PHP_FUNCTION(readline);
---- sapi/cli/php_cli.c
-+++ sapi/cli/php_cli.c
+Index: sapi/cli/php_cli.c
+===================================================================
+RCS file: /repository/php-src/sapi/cli/php_cli.c,v
+retrieving revision 1.129.2.13.2.6
+diff -u -r1.129.2.13.2.6 php_cli.c
+--- sapi/cli/php_cli.c 27 Jun 2006 08:27:10 -0000 1.129.2.13.2.6
++++ sapi/cli/php_cli.c 17 Aug 2006 22:47:10 -0000
@@ -76,7 +76,7 @@
#endif
@@ -37,8 +50,13 @@
#if !HAVE_LIBEDIT
#include
participants (1)
-
root@Hilbert.suse.de