Re: checkuid weirdness

From: Date: Thu, 14 Mar 2002 17:29:50 +0000
Subject: Re: checkuid weirdness
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-81237@lists.php.net to get a copy of this message
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

« previous php.dev (#81237) next »