diff options
author | Jani Taskinen <jani@php.net> | 2007-10-11 08:26:13 +0000 |
---|---|---|
committer | Jani Taskinen <jani@php.net> | 2007-10-11 08:26:13 +0000 |
commit | 6c33a8c758c9da1e2c13aa85cdd4c21b0175ba53 (patch) | |
tree | a6f727c40f03a8d734c70680ddc287ae603b9b64 /main/safe_mode.c | |
parent | 8ce1211a626c1e487f7b4b9407fc345cb22aa9c2 (diff) | |
download | php-git-6c33a8c758c9da1e2c13aa85cdd4c21b0175ba53.tar.gz |
- Fix ws/cs and wrap the stuff within #if HAVE_BROKEN_GETCWD
Diffstat (limited to 'main/safe_mode.c')
-rw-r--r-- | main/safe_mode.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/main/safe_mode.c b/main/safe_mode.c index f5e7f9e7e8..90bc0babe7 100644 --- a/main/safe_mode.c +++ b/main/safe_mode.c @@ -86,14 +86,16 @@ PHPAPI int php_checkuid_ex(const char *filename, const char *fopen_mode, int mod * If that fails, passthrough and check directory... */ if (mode != CHECKUID_ALLOW_ONLY_DIR) { +#if HAVE_BROKEN_GETCWD + char ftest[MAXPATHLEN]; - char ftest[MAXPATHLEN]; - strcpy(ftest,filename); - if (VCWD_GETCWD(ftest, sizeof(ftest)) == NULL) { - strcpy(path,filename); - } else { - expand_filepath(filename, path TSRMLS_CC); - } + strcpy(ftest,filename); + if (VCWD_GETCWD(ftest, sizeof(ftest)) == NULL) { + strcpy(path,filename); + } else { + expand_filepath(filename, path TSRMLS_CC); + } +#endif ret = VCWD_STAT(path, &sb); if (ret < 0) { |