summaryrefslogtreecommitdiff
path: root/www/php4/files
diff options
context:
space:
mode:
authoradrianp <adrianp>2006-07-18 21:21:19 +0000
committeradrianp <adrianp>2006-07-18 21:21:19 +0000
commitdebfd8a03de0b4ad39184f53010a893568c9faa6 (patch)
tree14b3e74dfc4e1f5ae3a0891b3cd5fdea2442e913 /www/php4/files
parentf4755a28e4ce47d6dea38ffc48226f35646091a4 (diff)
downloadpkgsrc-debfd8a03de0b4ad39184f53010a893568c9faa6.tar.gz
Fix for CVE-2006-1990
Fix for CVE-2006-3011 Include our own pear.sh from the tarball but slightly hacked to get around memory isses on installation.
Diffstat (limited to 'www/php4/files')
-rw-r--r--www/php4/files/pear.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/www/php4/files/pear.sh b/www/php4/files/pear.sh
new file mode 100644
index 00000000000..a8eb8cdc80f
--- /dev/null
+++ b/www/php4/files/pear.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# first find which PHP binary to use
+if test "x$PHP_PEAR_PHP_BIN" != "x"; then
+ PHP="$PHP_PEAR_PHP_BIN"
+else
+ if test "@php_bin@" = '@'php_bin'@'; then
+ PHP=php
+ else
+ PHP="@php_bin@"
+ fi
+fi
+
+# then look for the right pear include dir
+if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then
+ INCDIR=$PHP_PEAR_INSTALL_DIR
+ INCARG="-d include_path=$PHP_PEAR_INSTALL_DIR"
+else
+ if test "@php_dir@" = '@'php_dir'@'; then
+ INCDIR=`dirname $0`
+ INCARG=""
+ else
+ INCDIR="@php_dir@"
+ INCARG="-d include_path=@php_dir@"
+ fi
+fi
+
+exec $PHP -C -q $INCARG -d output_buffering=1 -dmemory_limit=12M $INCDIR/pearcmd.php "$@"