diff options
| author | Ondřej Surý <ondrej@sury.org> | 2012-11-16 13:25:37 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2012-11-16 13:25:37 +0100 |
| commit | 0b82e05fe264306004119e30119e665365331e17 (patch) | |
| tree | b6ee689804e9ca3946a644a80760d821a032d42f /TSRM | |
| parent | b57a2691d5b72c3894e2d4e0f945cecc6b3a1953 (diff) | |
| download | php-0b82e05fe264306004119e30119e665365331e17.tar.gz | |
Imported Upstream version 5.5.0~alpha1upstream/5.5.0_alpha1
Diffstat (limited to 'TSRM')
| -rw-r--r-- | TSRM/tsrm_virtual_cwd.c | 9 | ||||
| -rw-r--r-- | TSRM/tsrm_win32.c | 5 |
2 files changed, 13 insertions, 1 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index 683d6a4d5..6779b5697 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -40,6 +40,10 @@ # 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 @@ -945,6 +949,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; diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index b40af77c4..c33b59914 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -193,7 +193,7 @@ Finished: TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC) { time_t t; - HANDLE thread_token; + HANDLE thread_token = NULL; PSID token_sid; SECURITY_INFORMATION sec_info = OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION; GENERIC_MAPPING gen_map = { FILE_GENERIC_READ, FILE_GENERIC_WRITE, FILE_GENERIC_EXECUTE, FILE_ALL_ACCESS }; @@ -363,6 +363,9 @@ Finished_Impersonate: } Finished: + if(thread_token != NULL) { + CloseHandle(thread_token); + } if(real_path != NULL) { free(real_path); real_path = NULL; |
