cvs: php4 /ext/standard filestat.c

From: Date: Fri, 26 Jul 2002 08:04:43 +0000
Subject: cvs: php4 /ext/standard filestat.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12987@lists.php.net to get a copy of this message
sesser Fri Jul 26 04:04:43 2002 EDT Modified files: /php4/ext/standard filestat.c Log: all functions based on php_stat are now safe mode aware... Index: php4/ext/standard/filestat.c diff -u php4/ext/standard/filestat.c:1.99 php4/ext/standard/filestat.c:1.100 --- php4/ext/standard/filestat.c:1.99 Mon Jul 8 08:52:22 2002 +++ php4/ext/standard/filestat.c Fri Jul 26 04:04:42 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filestat.c,v 1.99 2002/07/08 12:52:22 derick Exp $ */ +/* $Id: filestat.c,v 1.100 2002/07/26 08:04:42 sesser Exp $ */ #include "php.h" #include "safe_mode.h" @@ -552,6 +552,10 @@ int rmask=S_IROTH, wmask=S_IWOTH, xmask=S_IXOTH; /* access rights defaults to other */ char *stat_sb_names[13]={"dev", "ino", "mode", "nlink", "uid", "gid", "rdev", "size", "atime", "mtime", "ctime", "blksize", "blocks"}; + + if (PG(safe_mode) &&(!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + RETURN_FALSE; + } if (php_check_open_basedir(filename TSRMLS_CC)) { RETURN_FALSE;

« previous php.cvs (#12987) next »