*[Sessions]: Now session is accessible if process is ran by root. Fixing bug: https...
authorEvgeniy Spinov <evgeniy@growlmedia.com>
Sun, 28 Jun 2015 08:02:57 +0000 (12:02 +0400)
committerEvgeniy Spinov <evgeniy@growlmedia.com>
Sun, 28 Jun 2015 08:02:57 +0000 (12:02 +0400)
*[Sessions]: Replaced fstat with zend_fstat

ext/session/mod_files.c

index 57c5277a4ba88b3c2ee0473c2f0cf97f305d5de8..8fdce47a6524d39863866cf17b4fff96e1363400 100644 (file)
@@ -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;