Commit:    2acc38627092123ac462f3a23780bf887bf69286
Author:    Anatol Belski <a...@php.net>         Thu, 11 Jul 2013 00:48:12 +0200
Parents:   96f77f845a91858021a4e339d356ee5f734883ed
Branches:  PHP-5.4 PHP-5.5 master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=2acc38627092123ac462f3a23780bf887bf69286

Log:
Fixed bug #65226 chroot() does not get enabled

Bugs:
https://bugs.php.net/65226

Changed paths:
  M  NEWS
  M  ext/standard/config.m4


Diff:
diff --git a/NEWS b/NEWS
index d20ec7e..eef3c06 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ PHP                                                           
             NEWS
   . Fixed bug #62475 (variant_* functions causes crash when null given as an 
     argument). (Felipe)
   . Fixed bug #60732 (php_error_docref links to invalid pages). (Jakub Vrana)
+  . Fixed bug #65226 (chroot() does not get enabled). (Anatol)
 
 - CGI:
   . Fixed Bug #65143 (Missing php-cgi man page). (Remi)
diff --git a/ext/standard/config.m4 b/ext/standard/config.m4
index c33ae1e..c1f5aff 100644
--- a/ext/standard/config.m4
+++ b/ext/standard/config.m4
@@ -358,7 +358,29 @@ else
   AC_MSG_RESULT(no)
 fi
 
-if test "$PHP_SAPI" = "cgi" || test "$PHP_SAPI" = "cli" || test "$PHP_SAPI" = 
"embed"; then
+PHP_ENABLE_CHROOT_FUNC=no
+case "$PHP_SAPI" in
+  embed)
+    PHP_ENABLE_CHROOT_FUNC=yes
+  ;;
+
+  none)
+    for PROG in $PHP_BINARIES; do
+      case "$PROG" in
+        cgi|cli)
+          PHP_ENABLE_CHROOT_FUNC=yes
+        ;;
+
+        *)
+          PHP_ENABLE_CHROOT_FUNC=no
+          break
+        ;;
+      esac
+   done
+  ;;
+esac
+
+if test "$PHP_ENABLE_CHROOT_FUNC" = "yes"; then
   AC_DEFINE(ENABLE_CHROOT_FUNC, 1, [Whether to enable chroot() function])
 fi


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to