Re: cvs: php-src(PHP_5_3) /main safe_mode.c

From: Date: Thu, 11 Oct 2007 05:21:40 +0000
Subject: Re: cvs: php-src(PHP_5_3) /main safe_mode.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-46633@lists.php.net to get a copy of this message
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

« previous php.cvs (#46633) next »