#include <ntoskrnl.h>
#include <debug.h>
Go to the source code of this file.
◆ NDEBUG
Definition at line 12 of file unc.c.
◆ FsRtlDeregisterUncProvider()
Definition at line 202 of file unc.c.
203{
205
206
208 {
209 return;
210 }
211
213
214
216
217
219 {
220
221
223 {
226 }
227
228
230 {
233 }
234
235
237 }
238
239
241
242
244 {
246 }
247
249
250
251
252
253
254
255
256}
#define INVALID_HANDLE_VALUE
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define ExFreePoolWithTag(_P, _T)
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
LONG NTAPI KeReleaseSemaphore(IN PKSEMAPHORE Semaphore, IN KPRIORITY Increment, IN LONG Adjustment, IN BOOLEAN Wait)
VOID FsRtlpSetSymbolicLink(IN PCUNICODE_STRING DeviceName)
KSEMAPHORE FsRtlpUncSemaphore
◆ FsRtlpIsDfsEnabled()
Definition at line 28 of file unc.c.
29{
35 struct
36 {
39 } KeyQueryOutput;
40
41
42 KeyName.Buffer =
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Mup";
43 KeyName.Length =
sizeof(
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Mup") -
sizeof(
UNICODE_NULL);
44 KeyName.MaximumLength =
sizeof(
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Mup");
45
46
47
48
49
50
51
59 {
61 }
62
65 KeyName.MaximumLength =
sizeof(
L"DisableDfs");
66
70 {
72 }
73
74 return ((*(
PULONG)KeyQueryOutput.KeyInfo.Data) != 1);
75}
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
#define OBJ_CASE_INSENSITIVE
#define InitializeObjectAttributes(p, n, a, r, s)
@ KeyValuePartialInformation
_In_ ULONG _In_ ULONG _In_ ULONG Length
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Referenced by FsRtlRegisterUncProvider().
◆ FsRtlpOpenDev()
Definition at line 78 of file unc.c.
80{
85
87
88
91 &StrDeviceName,
92 0,
104 {
106 }
107
109 {
111 }
112
114}
#define FILE_ATTRIBUTE_NORMAL
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
static OUT PIO_STATUS_BLOCK IoStatusBlock
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Referenced by FsRtlRegisterUncProvider().
◆ FsRtlpRegisterProviderWithMUP()
Definition at line 135 of file unc.c.
138{
143
145
147
148
151 if (RegistrationInfo ==
NULL)
152 {
154 }
155
156
162
163
168 {
170 }
171
173 {
175 }
176
177
180
182}
#define ExAllocatePoolWithTag(hernya, size, tag)
#define FSCTL_MUP_REGISTER_PROVIDER
struct _MUP_PROVIDER_REGISTRATION_INFO MUP_PROVIDER_REGISTRATION_INFO
NTSYSAPI NTSTATUS NTAPI NtWaitForSingleObject(IN HANDLE hObject, IN BOOLEAN bAlertable, IN PLARGE_INTEGER Timeout)
NTSYSAPI NTSTATUS NTAPI NtFsControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
ULONG RedirectorDeviceNameOffset
ULONG RedirectorDeviceNameLength
BOOLEAN MailslotsSupported
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INSUFFICIENT_RESOURCES
UNICODE_STRING RedirectorDeviceName
BOOLEAN MailslotsSupported
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Referenced by FsRtlRegisterUncProvider().
◆ FsRtlpSetSymbolicLink()
Definition at line 117 of file unc.c.
118{
121
123
124
128 {
131 }
132}
NTSTATUS NTAPI IoCreateSymbolicLink(IN PUNICODE_STRING SymbolicLinkName, IN PUNICODE_STRING DeviceName)
NTSTATUS NTAPI IoDeleteSymbolicLink(IN PUNICODE_STRING SymbolicLinkName)
Referenced by FsRtlDeregisterUncProvider(), and FsRtlRegisterUncProvider().
◆ FsRtlRegisterUncProvider()
Definition at line 280 of file unc.c.
283{
287
289
291
293
294
295
296
298 {
300 {
301 DPRINT1(
"DFS is not disabled. Going through MUP\n");
302
303
304
305
306
309 }
310 }
311
312
313
314
315
317 {
318
321 {
323 }
324
325
328 {
331 }
332
336
337
341
342
344 }
345 else
346 {
347
350 {
351
353 ZwLoadDriver(&MupString);
356 {
358 }
359 }
360
361
362
363
365 {
366
369 {
371 }
372
373
375
376
379
380
383 {
385 }
386 }
387
388
391
392
394 }
395
397
398
399
400
402 {
405 }
406 else
407 {
408
410 {
412 }
413
415 }
416
419}
static const WCHAR Cleanup[]
#define RtlZeroMemory(Destination, Length)
NTSTATUS FsRtlpOpenDev(OUT PHANDLE DeviceHandle, IN PCWSTR DeviceName)
BOOLEAN FsRtlpIsDfsEnabled(VOID)
NTSTATUS FsRtlpRegisterProviderWithMUP(IN HANDLE MupHandle, IN PCUNICODE_STRING RedirectorDeviceName, IN BOOLEAN MailslotsSupported)
Referenced by RxStartMinirdr().
◆ FsRtlpRedirs
◆ FsRtlpUncSemaphore
◆ MailslotsSupported
◆ MupHandle
◆ NullHandle
Definition at line 22 of file unc.c.
◆ RedirectorDeviceName