cvs: php4 /ext/standard pageinfo.c
| From: | Ilia Alshanetsky | Date: | Fri, 16 Aug 2002 12:47:57 +0000 |
| Subject: | cvs: php4 /ext/standard pageinfo.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-13409@lists.php.net to get a copy of this message | ||
iliaa Fri Aug 16 08:47:57 2002 EDT
Modified files:
/php4/ext/standard pageinfo.c
Log:
Added a handler for php -r '' for SAFE_MODE
Index: php4/ext/standard/pageinfo.c
diff -u php4/ext/standard/pageinfo.c:1.30 php4/ext/standard/pageinfo.c:1.31
--- php4/ext/standard/pageinfo.c:1.30 Thu Feb 28 03:26:46 2002
+++ php4/ext/standard/pageinfo.c Fri Aug 16 08:47:56 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pageinfo.c,v 1.30 2002/02/28 08:26:46 sebastian Exp $ */
+/* $Id: pageinfo.c,v 1.31 2002/08/16 12:47:56 iliaa Exp $ */
#include "php.h"
#include "pageinfo.h"
@@ -35,6 +35,7 @@
#include <unistd.h>
#endif
#include <sys/stat.h>
+#include <sys/types.h>
#ifdef PHP_WIN32
#include <process.h>
#endif
@@ -56,6 +57,10 @@
BG(page_inode) = pstat->st_ino;
BG(page_mtime) = pstat->st_mtime;
}
+ else { /* handler for situations where there is no source file, ex. php -r */
+ BG(page_uid) = getuid();
+ BG(page_gid) = getgid();
+ }
}
}
/* }}} */