summaryrefslogtreecommitdiff
path: root/main/fopen_wrappers.c
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2015-03-30 04:13:43 +0200
committerKalle Sommer Nielsen <kalle@php.net>2015-03-30 04:13:43 +0200
commit298a0554a7b78feb7c1b2fd071041ac2b25c8c65 (patch)
tree0f5db95d0ce13aa8df9264f8c66b8befcce3854b /main/fopen_wrappers.c
parent6a8ab3d7c6e24b2294099647ba0ebf2addf16bd0 (diff)
downloadphp-git-298a0554a7b78feb7c1b2fd071041ac2b25c8c65.tar.gz
This check here is not needed anymore for Windows (Unsupported Windows version check)
Diffstat (limited to 'main/fopen_wrappers.c')
-rw-r--r--main/fopen_wrappers.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c
index d8a83304cd..85127c3379 100644
--- a/main/fopen_wrappers.c
+++ b/main/fopen_wrappers.c
@@ -173,26 +173,20 @@ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path
while (VCWD_REALPATH(path_tmp, resolved_name) == NULL) {
#if defined(PHP_WIN32) || defined(HAVE_SYMLINK)
-#if defined(PHP_WIN32)
- if (EG(windows_version_info).dwMajorVersion > 5) {
-#endif
- if (nesting_level == 0) {
- int ret;
- char buf[MAXPATHLEN];
+ if (nesting_level == 0) {
+ int ret;
+ char buf[MAXPATHLEN];
- ret = php_sys_readlink(path_tmp, buf, MAXPATHLEN - 1);
- if (ret < 0) {
- /* not a broken symlink, move along.. */
- } else {
- /* put the real path into the path buffer */
- memcpy(path_tmp, buf, ret);
- path_tmp[ret] = '\0';
- }
+ ret = php_sys_readlink(path_tmp, buf, MAXPATHLEN - 1);
+ if (ret < 0) {
+ /* not a broken symlink, move along.. */
+ } else {
+ /* put the real path into the path buffer */
+ memcpy(path_tmp, buf, ret);
+ path_tmp[ret] = '\0';
}
-#if defined(PHP_WIN32)
}
#endif
-#endif
#if defined(PHP_WIN32) || defined(NETWARE)
path_file = strrchr(path_tmp, DEFAULT_SLASH);