Stops tempnam() from bypassing open_basedir directive.
This is my very first patch...thought I'd start small. Will someone
with karma please take a look and commit this if it meets your approval?
Justin Garrett
Index: ext/standard/file.c
===================================================================
RCS file: /repository/php4/ext/standard/file.c,v
retrieving revision 1.234
diff -u -b -w -B -r1.234 file.c
--- ext/standard/file.c 18 Jun 2002 12:16:27 -0000 1.234
+++ ext/standard/file.c 2 Jul 2002 01:18:48 -0000
@@ -525,6 +525,11 @@
}
convert_to_string_ex(arg1);
convert_to_string_ex(arg2);
+
+ if (php_check_open_basedir(Z_STRVAL_PP(arg1) TSRMLS_CC)){
+ RETURN_FALSE;
+ }
+
d = estrndup(Z_STRVAL_PP(arg1), Z_STRLEN_PP(arg1));
strlcpy(p, Z_STRVAL_PP(arg2), sizeof(p));
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php