Remove relative Junction Point linking for now (breaks tests).

This commit is contained in:
Erich E. Hoover 2014-07-22 21:30:16 -06:00
parent 5b691be2cc
commit a4d6e77557
2 changed files with 2 additions and 70 deletions

3
debian/changelog vendored
View File

@ -5,7 +5,8 @@ wine-compholio (1.7.23) UNRELEASED; urgency=low
* Return correct IMediaSeeking stream positions in quartz.
* Make sure LICENSE files are included in the Debian packages.
* Downgraded Arial replacement font to Liberation Sans v1.07.3.
-- Erich E. Hoover <erich.e.hoover@gmail.com> Tue, 22 Jul 2014 21:27:44 -0600
* Remove relative Junction Point linking for now (breaks tests).
-- Erich E. Hoover <erich.e.hoover@gmail.com> Tue, 22 Jul 2014 21:29:47 -0600
wine-compholio (1.7.22) unstable; urgency=low
* Implement passing ACLs to CreateProcess.

View File

@ -1,69 +0,0 @@
From f8bf15e30d5e0b9e30ceb644c07449b7782efb72 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 16 Jan 2014 21:07:43 -0700
Subject: ntdll: Use relative paths for creating links.
---
dlls/ntdll/file.c | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index b4e06d1..6907b2b 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -1487,6 +1487,7 @@ NTSTATUS FILE_CreateSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
int dest_fd, needs_close;
UNICODE_STRING nt_dest;
NTSTATUS status;
+ char *p;
if ((status = server_get_unix_fd( handle, FILE_SPECIAL_ACCESS, &dest_fd, &needs_close, NULL, NULL )))
return status;
@@ -1500,6 +1501,44 @@ NTSTATUS FILE_CreateSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
goto cleanup;
dest_allocated = TRUE;
+ p = strstr(unix_src.Buffer, "/dosdevices/");
+ if (p)
+ {
+ int count = -1; /* do not count the slash at the end of dosdevices or the last directory */
+
+ p += 11; /* strlen("/dosdevices") */
+ do
+ {
+ p++; /* skip the slash */
+ count++;
+ p = strchr(p, '/');
+ } while(p);
+ FIXME("found %d directories up.\n", count);
+ p = strstr(unix_dest.Buffer, "/dosdevices/");
+ if (p)
+ {
+ ANSI_STRING tmp;
+ int dest_len;
+ char *d;
+
+ p += 12; /* strlen("/dosdevices/") */
+ dest_len = unix_dest.Length - (p-unix_dest.Buffer) + 1;
+ tmp.Length = dest_len + 3*count; /* strlen("../") = 3 */
+ tmp.Buffer = RtlAllocateHeap(GetProcessHeap(), 0, tmp.Length);
+ d = tmp.Buffer;
+ for(; count > 0; count--)
+ {
+ (d++)[0] = '.';
+ (d++)[0] = '.';
+ (d++)[0] = '/';
+ }
+ memcpy(d, p, dest_len);
+ RtlFreeAnsiString( &unix_dest );
+ unix_dest.Length = tmp.Length;
+ unix_dest.Buffer = tmp.Buffer;
+ }
+ }
+
TRACE("Linking %s to %s\n", unix_src.Buffer, unix_dest.Buffer);
/* Produce the link in a temporary location */
--
1.7.9.5