jani Thu Oct 11 08:26:14 2007 UTC
Modified files: (Branch: PHP_5_3)
/php-src/main safe_mode.c
Log:
- Fix ws/cs and wrap the stuff within #if HAVE_BROKEN_GETCWD
http://cvs.php.net/viewvc.cgi/php-src/main/safe_mode.c?r1=1.62.2.1.2.10.2.1&r2=1.62.2.1.2.10.2.2&diff_format=u
Index: php-src/main/safe_mode.c
diff -u php-src/main/safe_mode.c:1.62.2.1.2.10.2.1
php-src/main/safe_mode.c:1.62.2.1.2.10.2.2
--- php-src/main/safe_mode.c:1.62.2.1.2.10.2.1 Wed Oct 10 22:52:58 2007
+++ php-src/main/safe_mode.c Thu Oct 11 08:26:13 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: safe_mode.c,v 1.62.2.1.2.10.2.1 2007/10/10 22:52:58 ab5602 Exp $ */
+/* $Id: safe_mode.c,v 1.62.2.1.2.10.2.2 2007/10/11 08:26:13 jani Exp $ */
#include "php.h"
@@ -86,14 +86,16 @@
* If that fails, passthrough and check directory...
*/
if (mode != CHECKUID_ALLOW_ONLY_DIR) {
+#if HAVE_BROKEN_GETCWD
+ char ftest[MAXPATHLEN];
- char ftest[MAXPATHLEN];
- strcpy(ftest,filename);
- if (VCWD_GETCWD(ftest, sizeof(ftest)) == NULL) {
- strcpy(path,filename);
- } else {
- expand_filepath(filename, path TSRMLS_CC);
- }
+ strcpy(ftest,filename);
+ if (VCWD_GETCWD(ftest, sizeof(ftest)) == NULL) {
+ strcpy(path,filename);
+ } else {
+ expand_filepath(filename, path TSRMLS_CC);
+ }
+#endif
ret = VCWD_STAT(path, &sb);
if (ret < 0) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php