From 650e073f7a88350002436baabe778957388d1411 Mon Sep 17 00:00:00 2001 From: Evgeniy Spinov Date: Sun, 28 Jun 2015 12:02:57 +0400 Subject: [PATCH] *[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 --- ext/session/mod_files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.40.0