summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-29 13:43:40 +0200
committerAnatol Belski <ab@php.net>2014-08-29 13:43:40 +0200
commitf9b051241a227bcb3795d059ecfd8c939f4af08d (patch)
tree28cde5aa7fd8c33a920d383f707083143b08f7e5
parent13ccda724988d30d0522207344c0e4f9b0cdc2b4 (diff)
downloadphp-git-f9b051241a227bcb3795d059ecfd8c939f4af08d.tar.gz
fix stat vs zend_stat
-rw-r--r--ext/session/mod_files.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index 8cdf446000..3f43513d4c 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -150,7 +150,7 @@ static void ps_files_open(ps_files *data, const char *key TSRMLS_DC)
#else
/* Check to make sure that the opened file is not outside of allowable dirs.
This is not 100% safe but it's hard to do something better without O_NOFOLLOW */
- if(PG(open_basedir) && lstat(buf, &sbuf) == 0 && S_ISLNK(sbuf.st_mode) && php_check_open_basedir(buf TSRMLS_CC)) {
+ if(PG(open_basedir) && zend_lstat(buf, &sbuf) == 0 && S_ISLNK(sbuf.st_mode) && php_check_open_basedir(buf TSRMLS_CC)) {
return;
}
data->fd = VCWD_OPEN_MODE(buf, O_CREAT | O_RDWR | O_BINARY, data->filemode);
@@ -363,7 +363,7 @@ PS_READ_FUNC(files)
return FAILURE;
}
- if (fstat(data->fd, &sbuf)) {
+ if (zend_fstat(data->fd, &sbuf)) {
return FAILURE;
}