]> granicus.if.org Git - php/commitdiff
Fixed bug #63241 PHP fails to open Windows deduplicated files.
authorAnatoliy Belsky <ab@php.net>
Wed, 31 Oct 2012 21:41:03 +0000 (22:41 +0100)
committerAnatoliy Belsky <ab@php.net>
Wed, 31 Oct 2012 21:41:03 +0000 (22:41 +0100)
Fix by (daniel dot stelter-gliese at innogames dot de).
No test is supplied because the issue addresses
the new feature of the Windows Server 2012 and
would need a very specific filesystem setup.

NEWS
TSRM/tsrm_virtual_cwd.c

diff --git a/NEWS b/NEWS
index 89921e85edc813c05ec23d6cb7a442cf9eed25f7..9b870113aca84cdb06312519efeb219556e1e02b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2012, PHP 5.3.19
 
+- Core
+  . Fixed bug #63241 PHP fails to open Windows deduplicated files.
+    (daniel dot stelter-gliese at innogames dot de)
+
 - Libxml
   . Fixed bug #63389 (Missing context check on libxml_set_streams_context()
     causes memleak). (Laruence)
index e734406837968b2377a7245b464adeb9a54a2ed5..d4ee22328841b1e5bd0324cea13f0e501ad662d9 100644 (file)
 #  define IO_REPARSE_TAG_SYMLINK 0xA000000C
 # endif
 
+# ifndef IO_REPARSE_TAG_DEDUP
+#  define IO_REPARSE_TAG_DEDUP   0x80000013
+# endif
+
 # ifndef VOLUME_NAME_NT
 #  define VOLUME_NAME_NT 0x2
 # endif
@@ -958,6 +962,11 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
                                        return -1;
                                };
                                substitutename[substitutename_len] = 0;
+                       }
+                       else if (pbuffer->ReparseTag == IO_REPARSE_TAG_DEDUP) {
+                               isabsolute = 1;
+                               memcpy(substitutename, path, len + 1);
+                               substitutename_len = len;
                        } else {
                                tsrm_free_alloca(pbuffer, use_heap_large);
                                return -1;