summaryrefslogtreecommitdiff
path: root/main/php_streams.h
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2002-08-16 09:50:24 +0000
committerWez Furlong <wez@php.net>2002-08-16 09:50:24 +0000
commitc2cbae6dd3ace83f57e96c994d366f84f3c51bd0 (patch)
tree20dbb550ccb9f2390bf91097cf499a74e32cae58 /main/php_streams.h
parent613871d403aca4210f92bec678f33788edd708f5 (diff)
downloadphp-git-c2cbae6dd3ace83f57e96c994d366f84f3c51bd0.tar.gz
Enhance Ilia's recent patch to query the wrapper subsystem to determine
if a filename is a URL and thus if safe-mode checks should be skipped.
Diffstat (limited to 'main/php_streams.h')
-rwxr-xr-xmain/php_streams.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/php_streams.h b/main/php_streams.h
index 7791ad59de..3b83d2638f 100755
--- a/main/php_streams.h
+++ b/main/php_streams.h
@@ -370,6 +370,9 @@ PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show
* */
#define STREAM_WILL_CAST 32
+/* this flag applies to php_stream_locate_url_wrapper */
+#define STREAM_LOCATE_WRAPPERS_ONLY 64
+
#ifdef PHP_WIN32
# define IGNORE_URL_WIN IGNORE_URL
#else
@@ -381,6 +384,7 @@ int php_shutdown_stream_wrappers(TSRMLS_D);
PHPAPI int php_register_url_stream_wrapper(char *protocol, php_stream_wrapper *wrapper TSRMLS_DC);
PHPAPI int php_unregister_url_stream_wrapper(char *protocol TSRMLS_DC);
PHPAPI php_stream *_php_stream_open_wrapper_ex(char *path, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC);
+PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, char **path_for_open, int options TSRMLS_DC);
#define php_stream_open_wrapper(path, mode, options, opened) _php_stream_open_wrapper_ex((path), (mode), (options), (opened), NULL STREAMS_CC TSRMLS_CC)
#define php_stream_open_wrapper_ex(path, mode, options, opened, context) _php_stream_open_wrapper_ex((path), (mode), (options), (opened), (context) STREAMS_CC TSRMLS_CC)