cvs: php4(PHP_4_2_0) /ext/standard filestat.c

From: Date: Sun, 28 Jul 2002 18:39:48 +0000
Subject: cvs: php4(PHP_4_2_0) /ext/standard filestat.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13018@lists.php.net to get a copy of this message
sesser Sun Jul 28 14:39:48 2002 EDT Modified files: (Branch: PHP_4_2_0) /php4/ext/standard filestat.c Log: MFH Index: php4/ext/standard/filestat.c diff -u php4/ext/standard/filestat.c:1.89.2.3 php4/ext/standard/filestat.c:1.89.2.4 --- php4/ext/standard/filestat.c:1.89.2.3 Thu May 16 11:27:50 2002 +++ php4/ext/standard/filestat.c Sun Jul 28 14:39:48 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filestat.c,v 1.89.2.3 2002/05/16 15:27:50 sniper Exp $ */ +/* $Id: filestat.c,v 1.89.2.4 2002/07/28 18:39:48 sesser Exp $ */ #include "php.h" #include "safe_mode.h" @@ -552,6 +552,14 @@ 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; + } stat_sb = &BG(sb);

« previous php.cvs (#13018) next »