CVS update: php3/functions

From: Date: Wed, 12 Aug 1998 03:09:07 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-111@lists.php.net to get a copy of this message
Date: Tuesday August 11, 1998 @ 23:09 Author: steffann Update of /repository/php3/functions In directory asf:/tmp/cvs-serv8999/functions Modified Files: filestat.c Log Message: Add basedir-support to the filestat-functions. Index: php3/functions/filestat.c diff -c php3/functions/filestat.c:1.72 php3/functions/filestat.c:1.73 *** php3/functions/filestat.c:1.72 Thu May 21 19:57:29 1998 --- php3/functions/filestat.c Tue Aug 11 23:09:07 1998 *************** *** 27,39 **** +----------------------------------------------------------------------+ */ ! /* $Id: filestat.c,v 1.72 1998/05/21 23:57:29 zeev Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif #include "php.h" #include "internal_functions.h" #include "safe_mode.h" #include <stdlib.h> #include <sys/stat.h> --- 27,40 ---- +----------------------------------------------------------------------+ */ ! /* $Id: filestat.c,v 1.73 1998/08/12 03:09:07 steffann Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif #include "php.h" #include "internal_functions.h" #include "safe_mode.h" + #include "fopen-wrappers.h" #include <stdlib.h> #include <sys/stat.h> *************** *** 148,153 **** --- 149,157 ---- } /* #endif */ + /* Check the basedir */ + if (_php3_check_fopen_basedir(filename->value.str.val)) RETURN_FALSE; + ret = chown(filename->value.str.val, -1, gid); if (ret == -1) { php3_error(E_WARNING, "chgrp failed: %s", strerror(errno)); *************** *** 189,194 **** --- 193,201 ---- RETURN_FALSE; } + /* Check the basedir */ + if (_php3_check_fopen_basedir(filename->value.str.val)) RETURN_FALSE; + ret = chown(filename->value.str.val, uid, -1); if (ret == -1) { php3_error(E_WARNING, "chown failed: %s", strerror(errno)); *************** *** 217,222 **** --- 224,232 ---- RETURN_FALSE; } + /* Check the basedir */ + if (_php3_check_fopen_basedir(filename->value.str.val)) RETURN_FALSE; + ret = chmod(filename->value.str.val, mode->value.lval); if (ret == -1) { php3_error(E_WARNING, "chmod failed: %s", strerror(errno)); *************** *** 264,269 **** --- 274,282 ---- if (newtime) efree(newtime); RETURN_FALSE; } + + /* Check the basedir */ + if (_php3_check_fopen_basedir(filename->value.str.val)) RETURN_FALSE; /* create the file if it doesn't exist already */ ret = stat(filename->value.str.val, &sb); -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#111) next »