diff options
author | Evgeniy Spinov <evgeniy@growlmedia.com> | 2015-06-28 12:02:57 +0400 |
---|---|---|
committer | Evgeniy Spinov <evgeniy@growlmedia.com> | 2015-06-28 12:02:57 +0400 |
commit | 650e073f7a88350002436baabe778957388d1411 (patch) | |
tree | b0c0fcfb3d3e650739e9e63ce9d129281b3ca271 /ext/session | |
parent | 2edf296a92a2319954d0b3f43f031335c2acb553 (diff) | |
download | php-git-650e073f7a88350002436baabe778957388d1411.tar.gz |
*[Sessions]: Now session is accessible if process is ran by root. Fixing bug: https://bugs.php.net/bug.php?id=69582
*[Sessions]: Replaced fstat with zend_fstat
Diffstat (limited to 'ext/session')
-rw-r--r-- | ext/session/mod_files.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index 57c5277a4b..8fdce47a65 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -202,7 +202,7 @@ static void ps_files_open(ps_files *data, const char *key) accessed by backend with root permissions to execute some system tasks. */ - if (fstat(data->fd, &sbuf) || (sbuf.st_uid != 0 && sbuf.st_uid != getuid() && sbuf.st_uid != geteuid() && getuid() != 0)) { + if (zend_fstat(data->fd, &sbuf) || (sbuf.st_uid != 0 && sbuf.st_uid != getuid() && sbuf.st_uid != geteuid() && getuid() != 0)) { close(data->fd); data->fd = -1; return; |