[PHP-CVS] cvs: php-src(PHP_5_3) /main fopen_wrappers.h

2009-01-16 Thread Pierre-Alain Joye
pajoye  Fri Jan 16 10:06:10 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   fopen_wrappers.h 
  Log:
  - MFH: add OPENBASEDIR_CHECKPATH macro to ease merge between 5.3 and 6, it 
includes safemode (5.3) and openbasedir check
  
http://cvs.php.net/viewvc.cgi/php-src/main/fopen_wrappers.h?r1=1.44.2.1.2.2.2.6&r2=1.44.2.1.2.2.2.7&diff_format=u
Index: php-src/main/fopen_wrappers.h
diff -u php-src/main/fopen_wrappers.h:1.44.2.1.2.2.2.6 
php-src/main/fopen_wrappers.h:1.44.2.1.2.2.2.7
--- php-src/main/fopen_wrappers.h:1.44.2.1.2.2.2.6  Wed Dec 31 11:15:47 2008
+++ php-src/main/fopen_wrappers.h   Fri Jan 16 10:06:10 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: fopen_wrappers.h,v 1.44.2.1.2.2.2.6 2008/12/31 11:15:47 sebastian Exp 
$ */
+/* $Id: fopen_wrappers.h,v 1.44.2.1.2.2.2.7 2009/01/16 10:06:10 pajoye Exp $ */
 
 #ifndef FOPEN_WRAPPERS_H
 #define FOPEN_WRAPPERS_H
@@ -33,6 +33,16 @@
 PHPAPI int php_check_open_basedir_ex(const char *path, int warn TSRMLS_DC);
 PHPAPI int php_check_specific_open_basedir(const char *basedir, const char 
*path TSRMLS_DC);
 
+/* {{{ OPENBASEDIR_CHECKPATH(filename) to ease merge between 6.x and 5.x */
+#if (PHP_MAJOR_VERSION < 6)
+# define OPENBASEDIR_CHECKPATH(filename) \
+   (PG(safe_mode) && (!php_checkuid(filename, NULL, 
CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename TSRMLS_CC)
+#else
+#define OPENBASEDIR_CHECKPATH(filename) \
+   php_check_open_basedir(filename TSRMLS_CC)
+#endif
+/* }}} */
+
 PHPAPI int php_check_safe_mode_include_dir(const char *path TSRMLS_DC);
 
 PHPAPI char *php_resolve_path(const char *filename, int filename_len, const 
char *path TSRMLS_DC);



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main fopen_wrappers.h

2007-12-12 Thread Ilia Alshanetsky
iliaa   Thu Dec 13 00:25:38 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   fopen_wrappers.h 
  Log:
  Fixed bug #43580 (removed bogus declaration of a non-existent php_is_url()
  function)
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/fopen_wrappers.h?r1=1.44.2.1.2.2&r2=1.44.2.1.2.2.2.1&diff_format=u
Index: php-src/main/fopen_wrappers.h
diff -u php-src/main/fopen_wrappers.h:1.44.2.1.2.2 
php-src/main/fopen_wrappers.h:1.44.2.1.2.2.2.1
--- php-src/main/fopen_wrappers.h:1.44.2.1.2.2  Mon Jan  1 09:36:10 2007
+++ php-src/main/fopen_wrappers.h   Thu Dec 13 00:25:38 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: fopen_wrappers.h,v 1.44.2.1.2.2 2007/01/01 09:36:10 sebastian Exp $ */
+/* $Id: fopen_wrappers.h,v 1.44.2.1.2.2.2.1 2007/12/13 00:25:38 iliaa Exp $ */
 
 #ifndef FOPEN_WRAPPERS_H
 #define FOPEN_WRAPPERS_H
@@ -35,7 +35,6 @@
 
 PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const 
char *path, char **opened_path TSRMLS_DC);
 
-PHPAPI int php_is_url(char *path);
 PHPAPI char *php_strip_url_passwd(char *path);
 END_EXTERN_C()
 

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