diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2010-04-26 23:53:30 +0000 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2010-04-26 23:53:30 +0000 |
commit | dd8e59da8f5aafd9d77a0f1f17e5e272d09f643f (patch) | |
tree | 6c3e808cb0300c72f869478fbbc9dea69e5cf697 /ext/session/mod_files.c | |
parent | 3c78ad763ebb0e09ad5524ba08fa6e83feffe102 (diff) | |
download | php-git-dd8e59da8f5aafd9d77a0f1f17e5e272d09f643f.tar.gz |
Removed safe_mode
* Removed ini options, safe_mode*
* Removed --enable-safe-mode --with-exec-dir configure options on Unix
* Updated extensions, SAPI's and core
* php_get_current_user() is now declared in main.c, thrus no need to include safe_mode.h anymore
Diffstat (limited to 'ext/session/mod_files.c')
-rw-r--r-- | ext/session/mod_files.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index acb1ea0dec..71584ce71d 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -171,20 +171,14 @@ static void ps_files_open(ps_files *data, const char *key TSRMLS_DC) if (data->fd != -1) { #ifndef PHP_WIN32 /* check to make sure that the opened file is not a symlink, linking to data outside of allowable dirs */ - if (PG(safe_mode) || PG(open_basedir)) { + if (PG(open_basedir)) { struct stat sbuf; if (fstat(data->fd, &sbuf)) { close(data->fd); return; } - if ( - S_ISLNK(sbuf.st_mode) && - ( - php_check_open_basedir(buf TSRMLS_CC) || - (PG(safe_mode) && !php_checkuid(buf, NULL, CHECKUID_CHECK_FILE_AND_DIR)) - ) - ) { + if (S_ISLNK(sbuf.st_mode) && php_check_open_basedir(buf TSRMLS_CC)) { close(data->fd); return; } @@ -274,9 +268,6 @@ PS_OPEN_FUNC(files) /* if save path is an empty string, determine the temporary dir */ save_path = php_get_temporary_directory(); - if (PG(safe_mode) && (!php_checkuid(save_path, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { - return FAILURE; - } if (php_check_open_basedir(save_path TSRMLS_CC)) { return FAILURE; } |