cvs: php-src /ext/posix posix.c
| From: | Magnus M��tt� | Date: | Fri, 07 Jan 2005 17:38:04 +0000 |
| Subject: | cvs: php-src /ext/posix posix.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-29798@lists.php.net to get a copy of this message | ||
magnus Fri Jan 7 12:38:04 2005 EDT
Modified files:
/php-src/ext/posix posix.c
Log:
Argh.. Committed old patch.
Add safe_mode check and fix error code.
http://cvs.php.net/diff.php/php-src/ext/posix/posix.c?r1=1.61&r2=1.62&ty=u
Index: php-src/ext/posix/posix.c
diff -u php-src/ext/posix/posix.c:1.61 php-src/ext/posix/posix.c:1.62
--- php-src/ext/posix/posix.c:1.61 Fri Jan 7 11:05:06 2005
+++ php-src/ext/posix/posix.c Fri Jan 7 12:38:03 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: posix.c,v 1.61 2005/01/07 16:05:06 magnus Exp $ */
+/* $Id: posix.c,v 1.62 2005/01/07 17:38:03 magnus Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -133,7 +133,7 @@
static PHP_MINFO_FUNCTION(posix)
{
php_info_print_table_start();
- php_info_print_table_row(2, "Revision", "$Revision: 1.61 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.62 $");
php_info_print_table_end();
}
/* }}} */
@@ -660,9 +660,10 @@
path = expand_filepath(filename, NULL TSRMLS_CC);
- if (php_check_open_basedir_ex(path, 0 TSRMLS_CC)) {
+ if (php_check_open_basedir_ex(path, 0 TSRMLS_CC) ||
+ (PG(safe_mode) && (!php_checkuid_ex(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR,
CHECKUID_NO_ERRORS)))) {
efree(path);
- POSIX_G(last_error) = EACCES;
+ POSIX_G(last_error) = EPERM;
RETURN_FALSE;
}