Rebase against e470221dcaaadf10f222551997ff837f1e7557de

This commit is contained in:
Alistair Leslie-Hughes
2018-06-12 08:51:26 +10:00
parent d78f0a5a7b
commit 122a110c7a
7 changed files with 90 additions and 151 deletions

View File

@@ -1,18 +1,18 @@
From 61bf2e5fc768bcdf7c28fa459c9e1f8a98912169 Mon Sep 17 00:00:00 2001
From 97655d49034368dde4a9565f15692ae9416b8bc8 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 16 Jan 2014 20:56:49 -0700
Subject: ntdll: Add support for junction point creation.
Subject: [PATCH] ntdll: Add support for junction point creation.
---
dlls/ntdll/file.c | 91 +++++++++++++++++++++++++++++++++++++++++++++++
dlls/ntdll/tests/file.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++++
include/Makefile.in | 1 +
include/ntifs.h | 52 +++++++++++++++++++++++++++
4 files changed, 238 insertions(+)
include/ntifs.h | 50 ++++++++++++++++++++++++++
4 files changed, 236 insertions(+)
create mode 100644 include/ntifs.h
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 6a456efc46c..a058e9b362f 100644
index c4528fe..8cd673a 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -108,12 +108,14 @@
@@ -30,7 +30,7 @@ index 6a456efc46c..a058e9b362f 100644
#define SECSPERDAY 86400
#define SECS_1601_TO_1970 ((369 * 365 + 89) * (ULONGLONG)SECSPERDAY)
@@ -1653,6 +1655,76 @@ NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE handle, HANDLE event,
@@ -1649,6 +1651,76 @@ NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE handle, HANDLE event,
}
@@ -107,7 +107,7 @@ index 6a456efc46c..a058e9b362f 100644
/**************************************************************************
* NtFsControlFile [NTDLL.@]
* ZwFsControlFile [NTDLL.@]
@@ -1742,11 +1814,30 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
@@ -1738,11 +1810,30 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
}
break;
}
@@ -139,7 +139,7 @@ index 6a456efc46c..a058e9b362f 100644
return server_ioctl_file( handle, event, apc, apc_context, io, code,
in_buffer, in_size, out_buffer, out_size );
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index d1b8e5fee84..cfa60961d6d 100644
index bf87000..198e415 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -37,6 +37,7 @@
@@ -150,7 +150,7 @@ index d1b8e5fee84..cfa60961d6d 100644
#ifndef IO_COMPLETION_ALL_ACCESS
#define IO_COMPLETION_ALL_ACCESS 0x001F0003
@@ -4374,6 +4375,98 @@ static void test_query_ea(void)
@@ -4335,6 +4336,98 @@ static void test_query_ea(void)
#undef EA_BUFFER_SIZE
}
@@ -249,17 +249,17 @@ index d1b8e5fee84..cfa60961d6d 100644
START_TEST(file)
{
HMODULE hkernel32 = GetModuleHandleA("kernel32.dll");
@@ -4440,4 +4533,5 @@ START_TEST(file)
@@ -4401,4 +4494,5 @@ START_TEST(file)
test_ioctl();
test_flush_buffers_file();
test_query_ea();
+ test_junction_points();
}
diff --git a/include/Makefile.in b/include/Makefile.in
index cc42f66ebd4..255797759fb 100644
index 78ab095..dc2bede 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -550,6 +550,7 @@ HEADER_SRCS = \
@@ -469,6 +469,7 @@ SOURCES = \
ntddstor.h \
ntdef.h \
ntdsapi.h \
@@ -269,10 +269,10 @@ index cc42f66ebd4..255797759fb 100644
ntsecapi.h \
diff --git a/include/ntifs.h b/include/ntifs.h
new file mode 100644
index 00000000000..db07c28a5df
index 0000000..85100fe
--- /dev/null
+++ b/include/ntifs.h
@@ -0,0 +1,52 @@
@@ -0,0 +1,50 @@
+/*
+ * Win32 definitions for Windows NT
+ *
@@ -322,9 +322,7 @@ index 00000000000..db07c28a5df
+ };
+} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
+
+#define IO_REPARSE_TAG_MOUNT_POINT 0xa0000003
+
+#endif /* __WINE_NTIFS_H */
--
2.14.2
1.9.1

View File

@@ -1,19 +1,19 @@
From 63d7c7a66fcf9a64547dcedc7297153b4232368d Mon Sep 17 00:00:00 2001
From 029fb5b0aa9c8ecb76da3aae5a2394072bf2fa33 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 16 Jan 2014 21:00:21 -0700
Subject: ntdll: Add support for deleting junction points.
Subject: [PATCH] ntdll: Add support for deleting junction points.
---
dlls/ntdll/file.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++
dlls/ntdll/tests/file.c | 22 +++++++++++++++++++++
include/ntifs.h | 11 +++++++++++
3 files changed, 84 insertions(+)
include/ntifs.h | 12 ++++++++++++
3 files changed, 85 insertions(+)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 85f037a..70ed339 100644
index 73f9de4..4594c57 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -1778,6 +1778,41 @@ cleanup:
@@ -1775,6 +1775,41 @@ cleanup:
}
@@ -55,7 +55,7 @@ index 85f037a..70ed339 100644
/**************************************************************************
* NtFsControlFile [NTDLL.@]
* ZwFsControlFile [NTDLL.@]
@@ -1933,6 +1968,22 @@ NTSTATUS WINAPI SYSCALL(NtFsControlFile)(HANDLE handle, HANDLE event, PIO_APC_RO
@@ -1871,6 +1906,22 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
status = STATUS_SUCCESS;
break;
@@ -79,10 +79,10 @@ index 85f037a..70ed339 100644
{
REPARSE_DATA_BUFFER *buffer = (REPARSE_DATA_BUFFER *)out_buffer;
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 070f6ed..c21691f 100644
index 286d1e4..a5cb3b7 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -4265,12 +4265,15 @@ static void test_junction_points(void)
@@ -4360,12 +4360,15 @@ static void test_junction_points(void)
static const WCHAR junctionW[] = {'\\','j','u','n','c','t','i','o','n',0};
WCHAR path[MAX_PATH], junction_path[MAX_PATH], target_path[MAX_PATH];
static const WCHAR targetW[] = {'\\','t','a','r','g','e','t',0};
@@ -98,7 +98,7 @@ index 070f6ed..c21691f 100644
UNICODE_STRING nameW;
HANDLE hJunction;
WCHAR *dest;
@@ -4318,6 +4321,8 @@ static void test_junction_points(void)
@@ -4413,6 +4416,8 @@ static void test_junction_points(void)
win_skip("Failed to open junction point directory handle (0x%x).\n", GetLastError());
goto cleanup;
}
@@ -107,7 +107,7 @@ index 070f6ed..c21691f 100644
buffer_len = build_reparse_buffer(nameW.Buffer, &buffer);
bret = DeviceIoControl(hJunction, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
ok(bret, "Failed to create junction point! (0x%x)\n", GetLastError());
@@ -4332,6 +4337,23 @@ static void test_junction_points(void)
@@ -4427,6 +4432,23 @@ static void test_junction_points(void)
ok(bret, "Failed to read junction point!\n");
ok((memcmp(dest, nameW.Buffer, string_len) == 0), "Junction point destination does not match ('%s' != '%s')!\n",
wine_dbgstr_w(dest), wine_dbgstr_w(nameW.Buffer));
@@ -132,10 +132,10 @@ index 070f6ed..c21691f 100644
cleanup:
diff --git a/include/ntifs.h b/include/ntifs.h
index db07c28..cb8638b 100644
index 85100fe..10820e4 100644
--- a/include/ntifs.h
+++ b/include/ntifs.h
@@ -47,6 +47,17 @@ typedef struct _REPARSE_DATA_BUFFER {
@@ -47,4 +47,16 @@ typedef struct _REPARSE_DATA_BUFFER {
};
} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
@@ -149,10 +149,9 @@ index db07c28..cb8638b 100644
+ } GenericReparseBuffer;
+} REPARSE_GUID_DATA_BUFFER, *PREPARSE_GUID_DATA_BUFFER;
+
#define IO_REPARSE_TAG_MOUNT_POINT 0xa0000003
+#define REPARSE_GUID_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_GUID_DATA_BUFFER, GenericReparseBuffer)
+
#endif /* __WINE_NTIFS_H */
--
2.7.1
1.9.1