]> granicus.if.org Git - php/commitdiff
fix values for gid and uid
authorAnatol Belski <ab@php.net>
Wed, 11 Feb 2015 10:43:27 +0000 (11:43 +0100)
committerAnatol Belski <ab@php.net>
Wed, 11 Feb 2015 10:46:31 +0000 (11:46 +0100)
As stated by MSDN, these fields are always set to zero

sapi/apache2handler/sapi_apache2.c

index c33e071c56d95add5f4aa62f0865045393ed339c..4361b78d333d2a810574650c24fdd9f42aa64f26 100644 (file)
@@ -220,8 +220,13 @@ php_apache_sapi_get_stat(void)
 {
        php_struct *ctx = SG(server_context);
 
+#ifdef PHP_WIN32
+       ctx->finfo.st_uid = 0;
+       ctx->finfo.st_gid = 0;
+#else
        ctx->finfo.st_uid = ctx->r->finfo.user;
        ctx->finfo.st_gid = ctx->r->finfo.group;
+#endif
        ctx->finfo.st_dev = ctx->r->finfo.device;
        ctx->finfo.st_ino = ctx->r->finfo.inode;
 #if defined(NETWARE) && defined(CLIB_STAT_PATCH)