cvs: /php4 fopen-wrappers.c
| From: | Zeev Suraski | Date: | Mon, 10 Apr 2000 22:51:03 +0000 |
| Subject: | cvs: /php4 fopen-wrappers.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-13373@lists.php.net to get a copy of this message | ||
zeev Mon Apr 10 15:51:03 2000 EDT
Modified files:
/php4 fopen-wrappers.c
Log:
Fix another missing opened_path assignment
Index: php4/fopen-wrappers.c
diff -u php4/fopen-wrappers.c:1.52 php4/fopen-wrappers.c:1.53
--- php4/fopen-wrappers.c:1.52 Sun Apr 9 12:54:50 2000
+++ php4/fopen-wrappers.c Mon Apr 10 15:50:32 2000
@@ -16,7 +16,7 @@
| Jim Winstead <jimw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: fopen-wrappers.c,v 1.52 2000/04/09 19:54:50 andi Exp $ */
+/* $Id: fopen-wrappers.c,v 1.53 2000/04/10 22:50:32 zeev Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -369,15 +369,23 @@
}
return fp;
} else {
- if (php_check_open_basedir(filename)) return NULL;
- return PHP_FOPEN(filename, mode);
+ if (php_check_open_basedir(filename)) {
+ return NULL;
+ }
+ fp = PHP_FOPEN(filename, mode);
+ if (fp && opened_path) {
+ *opened_path = expand_filepath(filename);
+ }
+ return fp;
}
}
if (!path || (path && !*path)) {
if (PG(safe_mode) && (!php_checkuid(filename, cm))) {
return NULL;
}
- if (php_check_open_basedir(filename)) return NULL;
+ if (php_check_open_basedir(filename)) {
+ return NULL;
+ }
fp = PHP_FOPEN(filename, mode);
if (fp && opened_path) {
*opened_path = strdup(filename);