]> granicus.if.org Git - php/commitdiff
- don't go through the reparse code when we have a share or DFS path
authorPierre Joye <pajoye@php.net>
Thu, 4 Feb 2010 09:29:24 +0000 (09:29 +0000)
committerPierre Joye <pajoye@php.net>
Thu, 4 Feb 2010 09:29:24 +0000 (09:29 +0000)
TSRM/tsrm_virtual_cwd.c

index a076ea99d96af97d5cc4a468142fb726901fa82d..dd3d123a186f016f9f9e662075ce8f2acc90f3ad 100644 (file)
@@ -714,7 +714,9 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
                tmp = tsrm_do_alloca(len+1, use_heap);
                memcpy(tmp, path, len+1);
 
-               if(save && (data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
+               if(save && 
+               !(IS_UNC_PATH(path, len) && len >= 3 && path[2] != '?') &&
+               (data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
                        /* File is a reparse point. Get the target */
                        HANDLE hLink = NULL;
                        REPARSE_DATA_BUFFER * pbuffer;