On Thu, Mar 14, 2002 at 08:20:38AM -0800, Rasmus Lerdorf wrote:
> How do you figure? Doesn't it only do this in
> CHECKUID_ALLOW_FILE_NOT_EXISTS mode? This mode is used for things like
> rmdir(), chgrp(), chown(), chmod() where spitting out a safe mode error
> when the file in question doesn't exist isn't very useful.
Here is the snipset of the code:
if (mode != CHECKUID_ALLOW_ONLY_DIR) {
VCWD_REALPATH(filename, path);
ret = VCWD_STAT(path, &sb);
if (ret < 0) {
if (mode == CHECKUID_DISALLOW_FILE_NOT_EXISTS) {
php_error(E_WARNING, "Unable to access %s", filename);
return 0;
} else if (mode == CHECKUID_ALLOW_FILE_NOT_EXISTS)
php_error(E_WARNING, "Unable to access %s", filename);{
return 1;
}
you can see that the { is at the wrong place and so it will always return 1;
if CHECKUID_DISALLOW_FILE_NOT_EXISTS is not selected.
Stefan
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php