On 11.10.2007 02:52, Robert Thompson wrote: > ab5602 Wed Oct 10 22:52:59 2007 UTC > > Modified files: (Branch: PHP_5_3) > /php-src/main safe_mode.c > Log: > > Fix for bug 41899, safe mode and relative paths with Solaris's broken > getcwd().
Please do not commit such things without discussing them on the list or in IRC. Btw, you have problems with whitespaces in the patch. > @@ -86,7 +86,15 @@ > * If that fails, passthrough and check directory... > */ > if (mode != CHECKUID_ALLOW_ONLY_DIR) { > - expand_filepath(filename, path TSRMLS_CC); > + > + char ftest[MAXPATHLEN]; > + strcpy(ftest,filename); > + if (VCWD_GETCWD(ftest, sizeof(ftest)) == NULL) { > + strcpy(path,filename); > + } else { > + expand_filepath(filename, path TSRMLS_CC); > + } > + > ret = VCWD_STAT(path, &sb); > if (ret < 0) { > if (mode == CHECKUID_DISALLOW_FILE_NOT_EXISTS) { > -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php