Skip to content

Commit 650e073

Browse files
author
Evgeniy Spinov
committed
*[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
1 parent 2edf296 commit 650e073

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/session/mod_files.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static void ps_files_open(ps_files *data, const char *key)
202202
accessed by backend with root permissions to execute some system tasks.
203203
204204
*/
205-
if (fstat(data->fd, &sbuf) || (sbuf.st_uid != 0 && sbuf.st_uid != getuid() && sbuf.st_uid != geteuid() && getuid() != 0)) {
205+
if (zend_fstat(data->fd, &sbuf) || (sbuf.st_uid != 0 && sbuf.st_uid != getuid() && sbuf.st_uid != geteuid() && getuid() != 0)) {
206206
close(data->fd);
207207
data->fd = -1;
208208
return;

0 commit comments

Comments
 (0)