pajoye          Fri Jan 16 10:07:03 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/standard       link_win32.c 
  Log:
  - simplify code by using OPENBASEDIR_CHECKPATH
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/link_win32.c?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/standard/link_win32.c
diff -u php-src/ext/standard/link_win32.c:1.1.2.1 
php-src/ext/standard/link_win32.c:1.1.2.2
--- php-src/ext/standard/link_win32.c:1.1.2.1   Fri Jan 16 01:00:22 2009
+++ php-src/ext/standard/link_win32.c   Fri Jan 16 10:07:03 2009
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: link_win32.c,v 1.1.2.1 2009/01/16 01:00:22 pajoye Exp $ */
+/* $Id: link_win32.c,v 1.1.2.2 2009/01/16 10:07:03 pajoye Exp $ */
 #ifdef PHP_WIN32
 
 #include "php.h"
@@ -82,11 +82,7 @@
                return;
        }
 
-       if (PG(safe_mode) && !php_checkuid(link, NULL, 
CHECKUID_CHECK_FILE_AND_DIR)) {
-               RETURN_FALSE;
-       }
-
-       if (php_check_open_basedir(link TSRMLS_CC)) {
+       if (OPENBASEDIR_CHECKPATH(link)) {
                RETURN_FALSE;
        }
 
@@ -194,19 +190,11 @@
                RETURN_FALSE;
        }
 
-       if (PG(safe_mode) && !php_checkuid(dest_p, NULL, 
CHECKUID_CHECK_FILE_AND_DIR)) {
-               RETURN_FALSE;
-       }
-
-       if (PG(safe_mode) && !php_checkuid(source_p, NULL, 
CHECKUID_CHECK_FILE_AND_DIR)) {
+       if (OPENBASEDIR_CHECKPATH(dest_p)) {
                RETURN_FALSE;
        }
 
-       if (php_check_open_basedir(dest_p TSRMLS_CC)) {
-               RETURN_FALSE;
-       }
-
-       if (php_check_open_basedir(source_p TSRMLS_CC)) {
+       if (OPENBASEDIR_CHECKPATH(source_p)) {
                RETURN_FALSE;
        }
 
@@ -255,19 +243,11 @@
                RETURN_FALSE;
        }
 
-       if (PG(safe_mode) && !php_checkuid(dest_p, NULL, 
CHECKUID_CHECK_FILE_AND_DIR)) {
-               RETURN_FALSE;
-       }
-
-       if (PG(safe_mode) && !php_checkuid(source_p, NULL, 
CHECKUID_CHECK_FILE_AND_DIR)) {
-               RETURN_FALSE;
-       }
-
-       if (php_check_open_basedir(dest_p TSRMLS_CC)) {
+       if (OPENBASEDIR_CHECKPATH(source_p)) {
                RETURN_FALSE;
        }
 
-       if (php_check_open_basedir(source_p TSRMLS_CC)) {
+       if (OPENBASEDIR_CHECKPATH(dest_p)) {
                RETURN_FALSE;
        }
 



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

Reply via email to