jani            Thu Oct 11 08:28:02 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/main       safe_mode.c 
  Log:
  MF53
  
http://cvs.php.net/viewvc.cgi/php-src/main/safe_mode.c?r1=1.62.2.1.2.11&r2=1.62.2.1.2.12&diff_format=u
Index: php-src/main/safe_mode.c
diff -u php-src/main/safe_mode.c:1.62.2.1.2.11 
php-src/main/safe_mode.c:1.62.2.1.2.12
--- php-src/main/safe_mode.c:1.62.2.1.2.11      Wed Oct 10 23:54:39 2007
+++ php-src/main/safe_mode.c    Thu Oct 11 08:28:02 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: safe_mode.c,v 1.62.2.1.2.11 2007/10/10 23:54:39 ab5602 Exp $ */
+/* $Id: safe_mode.c,v 1.62.2.1.2.12 2007/10/11 08:28:02 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

Reply via email to