Rebase against 8075101480df82c5f4280d534f2d76f035653667.

This commit is contained in:
Sebastian Lackner
2015-10-21 19:51:16 +02:00
parent 7cf357b20c
commit bd89770641
16 changed files with 175 additions and 893 deletions

View File

@@ -1,21 +1,21 @@
From eac9db85f7a5703a41bb956a9cabc2277872881d Mon Sep 17 00:00:00 2001
From 0a7a9cfce718a28567b87a5bf6776632af629d41 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.
---
dlls/ntdll/file.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++
dlls/ntdll/file.c | 91 +++++++++++++++++++++++++++++++++++++++++++++++
dlls/ntdll/tests/file.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++++
include/Makefile.in | 1 +
include/ntifs.h | 52 +++++++++++++++++++++++++++
4 files changed, 236 insertions(+)
4 files changed, 238 insertions(+)
create mode 100644 include/ntifs.h
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 8503dd8..fb171f2 100644
index fecec13..d8bb01b 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -88,12 +88,14 @@
@@ -103,12 +103,14 @@
#include "winioctl.h"
#include "ddk/ntddk.h"
#include "ddk/ntddser.h"
@@ -30,7 +30,7 @@ index 8503dd8..fb171f2 100644
#define SECSPERDAY 86400
#define SECS_1601_TO_1970 ((369 * 365 + 89) * (ULONGLONG)SECSPERDAY)
@@ -1633,6 +1635,76 @@ NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE handle, HANDLE event,
@@ -1655,6 +1657,76 @@ NTSTATUS WINAPI SYSCALL(NtDeviceIoControlFile)(HANDLE handle, HANDLE event,
}
@@ -107,10 +107,16 @@ index 8503dd8..fb171f2 100644
/**************************************************************************
* NtFsControlFile [NTDLL.@]
* ZwFsControlFile [NTDLL.@]
@@ -1780,6 +1852,23 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
@@ -1803,11 +1875,30 @@ NTSTATUS WINAPI SYSCALL(NtFsControlFile)(HANDLE handle, HANDLE event, PIO_APC_RO
}
break;
}
+
case FSCTL_SET_SPARSE:
TRACE("FSCTL_SET_SPARSE: Ignoring request\n");
io->Information = 0;
status = STATUS_SUCCESS;
break;
+
+ case FSCTL_SET_REPARSE_POINT:
+ {
@@ -128,11 +134,12 @@ index 8503dd8..fb171f2 100644
+ }
+ break;
+ }
+
case FSCTL_PIPE_LISTEN:
case FSCTL_PIPE_WAIT:
default:
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 3696124..b7b9e00 100644
index 55e34ad..71e10c2 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -37,6 +37,7 @@
@@ -143,7 +150,7 @@ index 3696124..b7b9e00 100644
#ifndef IO_COMPLETION_ALL_ACCESS
#define IO_COMPLETION_ALL_ACCESS 0x001F0003
@@ -2866,6 +2867,98 @@ static void test_query_ea(void)
@@ -4273,6 +4274,98 @@ static void test_query_ea(void)
#undef EA_BUFFER_SIZE
}
@@ -242,17 +249,17 @@ index 3696124..b7b9e00 100644
START_TEST(file)
{
HMODULE hkernel32 = GetModuleHandleA("kernel32.dll");
@@ -2922,4 +3015,5 @@ START_TEST(file)
@@ -4332,4 +4425,5 @@ START_TEST(file)
test_query_volume_information_file();
test_query_attribute_information_file();
test_query_ea();
+ test_junction_points();
}
diff --git a/include/Makefile.in b/include/Makefile.in
index 499c5d4..e410e14 100644
index c5563a2..1e60e08 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -479,6 +479,7 @@ SRCDIR_INCLUDES = \
@@ -493,6 +493,7 @@ SRCDIR_INCLUDES = \
ntddstor.h \
ntdef.h \
ntdsapi.h \
@@ -319,5 +326,5 @@ index 0000000..db07c28
+
+#endif /* __WINE_NTIFS_H */
--
2.4.2
2.6.1

View File

@@ -1,18 +1,18 @@
From 8770e934e61e237b6ef88b5442e7635542d99d4c Mon Sep 17 00:00:00 2001
From 4489ca1cdd1eeb62b129e4f83278da14af653468 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 16 Jan 2014 20:57:57 -0700
Subject: ntdll: Add support for reading junction points.
---
dlls/ntdll/file.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++
dlls/ntdll/tests/file.c | 14 ++++++++++-
dlls/ntdll/file.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++
dlls/ntdll/tests/file.c | 14 ++++++++++-
2 files changed, 76 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 8413ad1..39044ee 100644
index d8bb01b..6e73547 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -1542,6 +1542,60 @@ cleanup:
@@ -1727,6 +1727,60 @@ cleanup:
}
@@ -73,9 +73,9 @@ index 8413ad1..39044ee 100644
/**************************************************************************
* NtFsControlFile [NTDLL.@]
* ZwFsControlFile [NTDLL.@]
@@ -1690,6 +1744,15 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
@@ -1882,6 +1936,15 @@ NTSTATUS WINAPI SYSCALL(NtFsControlFile)(HANDLE handle, HANDLE event, PIO_APC_RO
status = STATUS_SUCCESS;
break;
}
+ case FSCTL_GET_REPARSE_POINT:
+ {
@@ -90,10 +90,10 @@ index 8413ad1..39044ee 100644
{
REPARSE_DATA_BUFFER *buffer = (REPARSE_DATA_BUFFER *)in_buffer;
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 90e753d..5c218d7 100644
index 71e10c2..e07e6a8 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -2713,9 +2713,10 @@ static void test_junction_points(void)
@@ -4303,9 +4303,10 @@ static void test_junction_points(void)
static const WCHAR dotW[] = {'.',0};
REPARSE_DATA_BUFFER *buffer = NULL;
DWORD dwret, dwLen, dwFlags;
@@ -105,7 +105,7 @@ index 90e753d..5c218d7 100644
BOOL bret;
/* Create a temporary folder for the junction point tests */
@@ -2763,6 +2764,17 @@ static void test_junction_points(void)
@@ -4353,6 +4354,17 @@ static void test_junction_points(void)
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());
@@ -124,5 +124,5 @@ index 90e753d..5c218d7 100644
cleanup:
--
1.7.9.5
2.6.1

View File

@@ -1,19 +1,19 @@
From 2e0449be946b4d73a4debb712d5032d79bd93878 Mon Sep 17 00:00:00 2001
From 295b74af626b2870ff5f6923d7138f0c0ccb7346 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.
---
dlls/ntdll/file.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++
dlls/ntdll/tests/file.c | 23 +++++++++++++++++++++
include/ntifs.h | 11 ++++++++++
dlls/ntdll/file.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++
dlls/ntdll/tests/file.c | 23 ++++++++++++++++++++++
include/ntifs.h | 11 +++++++++++
3 files changed, 85 insertions(+)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 39044ee..c8d1a31 100644
index 6e73547..7abbc89 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -1596,6 +1596,41 @@ cleanup:
@@ -1781,6 +1781,41 @@ cleanup:
}
@@ -55,9 +55,9 @@ index 39044ee..c8d1a31 100644
/**************************************************************************
* NtFsControlFile [NTDLL.@]
* ZwFsControlFile [NTDLL.@]
@@ -1744,6 +1779,22 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
@@ -1936,6 +1971,22 @@ NTSTATUS WINAPI SYSCALL(NtFsControlFile)(HANDLE handle, HANDLE event, PIO_APC_RO
status = STATUS_SUCCESS;
break;
}
+ case FSCTL_DELETE_REPARSE_POINT:
+ {
@@ -79,10 +79,10 @@ index 39044ee..c8d1a31 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 5c218d7..f84f6ea 100644
index e07e6a8..b9aa665 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -2708,12 +2708,15 @@ static void test_junction_points(void)
@@ -4298,12 +4298,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 5c218d7..f84f6ea 100644
UNICODE_STRING nameW;
HANDLE hJunction;
WCHAR *dest;
@@ -2761,6 +2764,8 @@ static void test_junction_points(void)
@@ -4351,6 +4354,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 5c218d7..f84f6ea 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());
@@ -2775,6 +2780,24 @@ static void test_junction_points(void)
@@ -4365,6 +4370,24 @@ 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));
@@ -155,5 +155,5 @@ index db07c28..cb8638b 100644
#endif /* __WINE_NTIFS_H */
--
1.7.9.5
2.6.1