diff -ruN /usr/ports/www/suphp.orig/Makefile /usr/ports/www/suphp/Makefile --- /usr/ports/www/suphp.orig/Makefile Mon May 8 02:03:30 2006 +++ /usr/ports/www/suphp/Makefile Tue May 9 09:35:55 2006 @@ -7,12 +7,12 @@ PORTNAME= suphp PORTVERSION= 0.5.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITES= http://www.suphp.org/download/ MAINTAINER= freebsd@jdc.parodius.com -COMMENT= Securely execute ~user PHP scripts +COMMENT= Securely execute PHP scripts GNU_CONFIGURE= yes USE_PHP= yes @@ -20,7 +20,7 @@ WANT_PHP_CGI= yes WITH_LOGFILE?= /var/log/suphp.log -PHP_PATH?= ${LOCALBASE}/bin/php +PHP_PATH?= ${LOCALBASE}/bin/php-cgi MIN_UID?= 80 MIN_GID?= 80 WITH_SETID_MODE?= owner @@ -34,6 +34,14 @@ --with-min-uid=${MIN_GID} \ --with-apxs=${APXS} +# This is the default of the PATH environment variable when scripts +# are run under suphp. This path is normally hard-coded into suphp.c. +# Many people prefer to have /usr/local and other utilities available +# to php scripts. +# Make sure the path is colon-delimited! +# +SUPHP_PATH?= /bin:/usr/bin + ## Available knobs: ## WITHOUT_CHECKPATH: disable check if script resides in DOCUMENT_ROOT .if defined(WITHOUT_CHECKPATH) @@ -57,6 +65,10 @@ pre-everything:: show-options @${DO_NADA} + +post-patch: + @${REINPLACE_CMD} -e 's|%%SUPHP_PATH%%|${SUPHP_PATH}|g' \ + ${WRKSRC}/src/suphp.c post-install: .if !defined(NOPORTDOCS) diff -ruN /usr/ports/www/suphp.orig/files/patch-src::suphp.c /usr/ports/www/suphp/files/patch-src::suphp.c --- /usr/ports/www/suphp.orig/files/patch-src::suphp.c Wed Dec 31 16:00:00 1969 +++ /usr/ports/www/suphp/files/patch-src::suphp.c Tue May 9 09:32:50 2006 @@ -0,0 +1,11 @@ +--- src/suphp.c.orig Tue Jul 13 02:43:41 2004 ++++ src/suphp.c Tue May 9 08:59:46 2006 +@@ -55,7 +55,7 @@ + + // Set secure PATH + +- suphp_setenv("PATH", "/bin:/usr/bin", 1); ++ suphp_setenv("PATH", "%%SUPHP_PATH%%", 1); + + // Check for PHP_CONFIG environment variable + diff -ruN /usr/ports/www/suphp.orig/pkg-descr /usr/ports/www/suphp/pkg-descr --- /usr/ports/www/suphp.orig/pkg-descr Tue Jun 24 23:50:52 2003 +++ /usr/ports/www/suphp/pkg-descr Tue May 9 08:49:06 2006 @@ -1,8 +1,9 @@ -suPHP is a combination of an Apache module (mod_suphp) and an executable -which provides a wrapper for PHP. With both together, it is possible to -execute PHP scripts with the permissions of their owner without having -to place a PHP binary in each user's cgi-bin directory. suPHP doesn't -need Apache's suExec, provides a logging function and support for +suPHP is a combination of an Apache module (mod_suphp) and an +executable which provides a wrapper for PHP. With both +together, it is possible to execute PHP scripts with the +permissions of their owner without having to place a PHP +binary in each user's cgi-bin directory. suPHP doesn't need +Apache's suExec, provides a logging function and support for different php.ini's. -WWW: http://www.suphp.org +WWW: http://www.suphp.org/ diff -ruN /usr/ports/www/suphp.orig/pkg-message /usr/ports/www/suphp/pkg-message --- /usr/ports/www/suphp.orig/pkg-message Tue Jun 24 23:50:52 2003 +++ /usr/ports/www/suphp/pkg-message Tue May 9 08:48:44 2006 @@ -3,7 +3,8 @@ for PHP for Apache. For help on using this module, please see the suPHP homepage: - http://www.suphp.org + + http://www.suphp.org/ Important hints: Using suPHP can break some PHP-scripts, because of Apache's CGI