22#define MINIRDR__NAME "Value is ignored, only fact of definition"
37#if defined(__REACTOS__) && (NTDDI_VERSION < NTDDI_WIN7)
39 ULONG *utf8_bytes_written,
42 ULONG *uni_bytes_written,
46#define USE_MOUNT_SEC_CONTEXT
50#define DEBUG_MARSHAL_HEADER
51#define DEBUG_MARSHAL_DETAIL
55#define DEBUG_INVALIDATE_CACHE
67#define DEBUG_TIME_BASED_COHERENCY
74typedef struct __nfs41_timings {
89#define DISABLE_CACHING 0
90#define ENABLE_READ_CACHING 1
91#define ENABLE_WRITE_CACHING 2
92#define ENABLE_READWRITE_CACHING 3
94#define NFS41_MM_POOLTAG ('nfs4')
95#define NFS41_MM_POOLTAG_ACL ('acls')
96#define NFS41_MM_POOLTAG_MOUNT ('mnts')
97#define NFS41_MM_POOLTAG_OPEN ('open')
98#define NFS41_MM_POOLTAG_UP ('upca')
99#define NFS41_MM_POOLTAG_DOWN ('down')
109#define DECLARE_CONST_ANSI_STRING(_var, _string) \
110 const CHAR _var ## _buffer[] = _string; \
111 const ANSI_STRING _var = { sizeof(_string) - sizeof(CHAR), \
112 sizeof(_string), (PCH) _var ## _buffer }
113#define RELATIVE(wait) (-(wait))
114#define NANOSECONDS(nanos) (((signed __int64)(nanos)) / 100L)
115#define MICROSECONDS(micros) (((signed __int64)(micros)) * NANOSECONDS(1000L))
116#define MILLISECONDS(milli) (((signed __int64)(milli)) * MICROSECONDS(1000L))
117#define SECONDS(seconds) (((signed __int64)(seconds)) * MILLISECONDS(1000L))
128 return lhs->Length == rhs_len &&
288#define nfs41_AddEntry(lock,list,pEntry) \
289 ExAcquireFastMutex(&lock); \
290 InsertTailList(&(list).head, &(pEntry)->next); \
291 ExReleaseFastMutex(&lock);
292#define nfs41_RemoveFirst(lock,list,pEntry) \
293 ExAcquireFastMutex(&lock); \
294 pEntry = (IsListEmpty(&(list).head) \
296 : RemoveHeadList(&(list).head)); \
297 ExReleaseFastMutex(&lock);
298#define nfs41_RemoveEntry(lock,pEntry) \
299 ExAcquireFastMutex(&lock); \
300 RemoveEntryList(&pEntry->next); \
301 ExReleaseFastMutex(&lock);
302#define nfs41_IsListEmpty(lock,list,flag) \
303 ExAcquireFastMutex(&lock); \
304 flag = IsListEmpty(&(list).head); \
305 ExReleaseFastMutex(&lock);
306#define nfs41_GetFirstEntry(lock,list,pEntry) \
307 ExAcquireFastMutex(&lock); \
308 pEntry = (IsListEmpty(&(list).head) \
310 : (nfs41_updowncall_entry *) \
311 (CONTAINING_RECORD((list).head.Flink, \
312 nfs41_updowncall_entry, \
314 ExReleaseFastMutex(&lock);
315#define nfs41_GetFirstMountEntry(lock,list,pEntry) \
316 ExAcquireFastMutex(&lock); \
317 pEntry = (IsListEmpty(&(list).head) \
319 : (nfs41_mount_entry *) \
320 (CONTAINING_RECORD((list).head.Flink, \
323 ExReleaseFastMutex(&lock);
335#define SERVER_NAME_BUFFER_SIZE 1024
336#define MOUNT_CONFIG_RW_SIZE_MIN 1024
337#define MOUNT_CONFIG_RW_SIZE_DEFAULT 1048576
338#define MOUNT_CONFIG_RW_SIZE_MAX 1048576
339#define MAX_SEC_FLAVOR_LEN 12
340#define UPCALL_TIMEOUT_DEFAULT 50
365#define NFS41GetNetRootExtension(pNetRoot) \
366 (((pNetRoot) == NULL) ? NULL : \
367 (PNFS41_NETROOT_EXTENSION)((pNetRoot)->Context))
370#define FS_NAME L"NFS"
371#define FS_NAME_LEN (sizeof(FS_NAME) - sizeof(WCHAR))
372#define FS_ATTR_LEN (sizeof(FILE_FS_ATTRIBUTE_INFORMATION) + FS_NAME_LEN)
375#define VOL_NAME L"PnfsVolume"
376#define VOL_NAME_LEN (sizeof(VOL_NAME) - sizeof(WCHAR))
377#define VOL_ATTR_LEN (sizeof(FILE_FS_VOLUME_INFORMATION) + VOL_NAME_LEN)
390#define STORE_MOUNT_SEC_CONTEXT
391#ifdef STORE_MOUNT_SEC_CONTEXT
395#define NFS41GetVNetRootExtension(pVNetRoot) \
396 (((pVNetRoot) == NULL) ? NULL : \
397 (PNFS41_V_NET_ROOT_EXTENSION)((pVNetRoot)->Context))
409#define NFS41GetFcbExtension(pFcb) \
410 (((pFcb) == NULL) ? NULL : (PNFS41_FCB)((pFcb)->Context))
425#define NFS41GetFobxExtension(pFobx) \
426 (((pFobx) == NULL) ? NULL : (PNFS41_FOBX)((pFobx)->Context))
446#define NFS41GetDeviceExtension(RxContext,pExt) \
447 PNFS41_DEVICE_EXTENSION pExt = (PNFS41_DEVICE_EXTENSION) \
448 ((PBYTE)(RxContext->RxDeviceObject) + sizeof(RDBSS_DEVICE_OBJECT))
467#define RxDefineNode( node, type ) \
468 node->NodeTypeCode = NTC_##type; \
469 node->NodeByteSize = sizeof(type);
471#define RDR_NULL_STATE 0
472#define RDR_UNLOADED 1
473#define RDR_UNLOADING 2
477#define RDR_STOPPING 6
478#define RDR_STARTING 7
493 DbgP(
"FileOject %p name %wZ access r=%d,w=%d,d=%d share r=%d,w=%d,d=%d\n",
501 DbgP(
"Couldn't print FileObject IrpSp is NULL\n");
513 ULONG ActualCount = 0;
515 return sizeof(
str->MaximumLength) + ActualCount +
sizeof(
UNICODE_NULL);
526 if (
str->Length == 0) {
529 ansi.MaximumLength = 1;
535 &ActualCount,
str->Buffer,
str->Length);
537 print_error(
"RtlUnicodeToUTF8N('%wZ') failed with 0x%08X\n",
546 &ActualCount,
str->Buffer,
str->Length);
548 print_error(
"RtlUnicodeToUTF8N(%hu, '%wZ', %hu) failed with 0x%08X\n",
555 *
pos +=
sizeof(
ansi.MaximumLength);
556 (*pos)[ActualCount] =
'\0';
569 ULONG header_len = 0;
570 unsigned char *tmp =
buf;
572 header_len =
sizeof(
entry->version) +
sizeof(
entry->xid) +
574 if (header_len > buf_len) {
581 tmp +=
sizeof(
entry->version);
583 tmp +=
sizeof(
entry->xid);
585 tmp +=
sizeof(
entry->opcode);
591#ifdef DEBUG_MARSHAL_HEADER
593 DbgP(
"[upcall header] xid=%lld opcode=%s filename=%wZ version=%d "
594 "session=0x%x open_state=0x%x\n",
entry->xid,
614 return "UNKNOWN FLAVOR";
623 ULONG header_len = 0;
624 unsigned char *tmp =
buf;
638 if (header_len > buf_len) {
647 tmp +=
sizeof(
DWORD);
649 tmp +=
sizeof(
DWORD);
654#ifdef DEBUG_MARSHAL_DETAIL
655 DbgP(
"marshal_nfs41_mount: server name=%wZ mount point=%wZ sec_flavor=%s "
656 "rsize=%d wsize=%d\n",
entry->u.Mount.srv_name,
entry->u.Mount.root,
658 entry->u.Mount.wsize);
680 ULONG header_len = 0;
681 unsigned char *tmp =
buf;
690 if (header_len > buf_len) {
697 sizeof(
entry->u.Open.access_mask));
698 tmp +=
sizeof(
entry->u.Open.access_mask);
700 sizeof(
entry->u.Open.access_mode));
701 tmp +=
sizeof(
entry->u.Open.access_mode);
703 tmp +=
sizeof(
entry->u.Open.attrs);
705 tmp +=
sizeof(
entry->u.Open.copts);
707 tmp +=
sizeof(
entry->u.Open.disp);
709 sizeof(
entry->u.Open.open_owner_id));
710 tmp +=
sizeof(
entry->u.Open.open_owner_id);
712 tmp +=
sizeof(
DWORD);
719 if (
entry->u.Open.EaMdl) {
720 entry->u.Open.EaBuffer =
728 print_error(
"MmMapLockedPagesSpecifyCache failed to map pages\n");
741#ifdef DEBUG_MARSHAL_DETAIL
742 DbgP(
"marshal_nfs41_open: name=%wZ mask=0x%x access=0x%x attrs=0x%x "
743 "opts=0x%x dispo=0x%x open_owner_id=0x%x mode=%o srv_open=%p ea=%p\n",
747 entry->u.Open.srv_open,
entry->u.Open.EaBuffer);
760 ULONG header_len = 0;
761 unsigned char *tmp =
buf;
767 header_len = *
len +
sizeof(
entry->buf_len) +
768 sizeof(
entry->u.ReadWrite.offset) +
sizeof(
HANDLE);
769 if (header_len > buf_len) {
775 tmp +=
sizeof(
entry->buf_len);
777 sizeof(
entry->u.ReadWrite.offset));
778 tmp +=
sizeof(
entry->u.ReadWrite.offset);
789 print_error(
"MmMapLockedPagesSpecifyCache failed to map pages\n");
796 print_error(
"Call to MmMapLocked failed due to exception 0x%x\n",
code);
803#ifdef DEBUG_MARSHAL_DETAIL
804 DbgP(
"marshal_nfs41_rw: len=%lu offset=%llu MdlAddress=%p Userspace=%p\n",
819 ULONG header_len = 0;
820 unsigned char *tmp =
buf;
827 if (header_len > buf_len) {
840#ifdef DEBUG_MARSHAL_DETAIL
841 DbgP(
"marshal_nfs41_lock: offset=%llx length=%llx exclusive=%u "
842 "blocking=%u\n",
entry->u.Lock.offset,
entry->u.Lock.length,
843 entry->u.Lock.exclusive,
entry->u.Lock.blocking);
856 ULONG header_len = 0;
857 unsigned char *tmp =
buf;
866 if (header_len > buf_len) {
871 tmp +=
sizeof(
ULONG);
883#ifdef DEBUG_MARSHAL_DETAIL
884 DbgP(
"marshal_nfs41_unlock: count=%u\n",
entry->u.Unlock.count);
897 ULONG header_len = 0;
898 unsigned char *tmp =
buf;
905 if (
entry->u.Close.remove)
909 if (header_len > buf_len) {
916 if (
entry->u.Close.remove) {
924#ifdef DEBUG_MARSHAL_DETAIL
925 DbgP(
"marshal_nfs41_close: name=%wZ remove=%d srv_open=%p renamed=%d\n",
927 entry->u.Close.remove,
entry->u.Close.srv_open,
entry->u.Close.renamed);
940 ULONG header_len = 0;
941 unsigned char *tmp =
buf;
949 if (header_len > buf_len) {
955 tmp +=
sizeof(
ULONG);
957 tmp +=
sizeof(
ULONG);
967 entry->u.QueryFile.mdl_buf =
974 if (
entry->u.QueryFile.mdl_buf ==
NULL) {
975 print_error(
"MmMapLockedPagesSpecifyCache failed to map pages\n");
982 print_error(
"Call to MmMapLocked failed due to exception 0x%x\n",
code);
989#ifdef DEBUG_MARSHAL_DETAIL
990 DbgP(
"marshal_nfs41_dirquery: filter='%wZ'class=%d len=%d "
991 "1st\\restart\\single=%d\\%d\\%d\n",
entry->u.QueryFile.filter,
993 entry->u.QueryFile.initial_query,
entry->u.QueryFile.restart_scan,
994 entry->u.QueryFile.return_single);
1007 ULONG header_len = 0;
1008 unsigned char *tmp =
buf;
1014 header_len = *
len + 2 *
sizeof(
ULONG);
1015 if (header_len > buf_len) {
1020 tmp +=
sizeof(
ULONG);
1022 tmp +=
sizeof(
ULONG);
1028#ifdef DEBUG_MARSHAL_DETAIL
1029 DbgP(
"marshal_nfs41_filequery: class=%d\n",
entry->u.QueryFile.InfoClass);
1042 ULONG header_len = 0;
1043 unsigned char *tmp =
buf;
1051 if (header_len > buf_len) {
1058 tmp +=
sizeof(
ULONG);
1060 tmp +=
sizeof(
ULONG);
1064#ifdef DEBUG_MARSHAL_DETAIL
1065 DbgP(
"marshal_nfs41_fileset: filename='%wZ' class=%d\n",
1066 entry->filename,
entry->u.SetFile.InfoClass);
1079 ULONG header_len = 0;
1080 unsigned char *tmp =
buf;
1088 if (header_len > buf_len) {
1096 tmp +=
sizeof(
DWORD);
1098 tmp +=
sizeof(
ULONG);
1102#ifdef DEBUG_MARSHAL_DETAIL
1103 DbgP(
"marshal_nfs41_easet: filename=%wZ, buflen=%d mode=0x%x\n",
1117 ULONG header_len = 0;
1118 unsigned char *tmp =
buf;
1127 if (header_len > buf_len) {
1135 tmp +=
sizeof(
ULONG);
1141 tmp +=
sizeof(
ULONG);
1143 tmp +=
sizeof(
ULONG);
1144 if (
entry->u.QueryEa.EaList &&
entry->u.QueryEa.EaListLength)
1146 entry->u.QueryEa.EaListLength);
1149#ifdef DEBUG_MARSHAL_DETAIL
1150 DbgP(
"marshal_nfs41_eaget: filename=%wZ, index=%d list_len=%d "
1151 "rescan=%d single=%d\n",
entry->filename,
1152 entry->u.QueryEa.EaIndex,
entry->u.QueryEa.EaListLength,
1153 entry->u.QueryEa.RestartScan,
entry->u.QueryEa.ReturnSingleEntry);
1166 ULONG header_len = 0;
1167 unsigned char *tmp =
buf;
1174 if (
entry->u.Symlink.set)
1176 if (header_len > buf_len) {
1185 if (
entry->u.Symlink.set) {
1191#ifdef DEBUG_MARSHAL_DETAIL
1192 DbgP(
"marshal_nfs41_symlink: name %wZ symlink target %wZ\n",
1207 ULONG header_len = 0;
1208 unsigned char *tmp =
buf;
1215 if (header_len > buf_len) {
1223#ifdef DEBUG_MARSHAL_DETAIL
1224 DbgP(
"marshal_nfs41_volume: class=%d\n",
entry->u.Volume.query);
1237 ULONG header_len = 0;
1238 unsigned char *tmp =
buf;
1245 if (header_len > buf_len) {
1253#ifdef DEBUG_MARSHAL_DETAIL
1254 DbgP(
"marshal_nfs41_getacl: class=0x%x\n",
entry->u.Acl.query);
1267 ULONG header_len = 0;
1268 unsigned char *tmp =
buf;
1276 if (header_len > buf_len) {
1284 tmp +=
sizeof(
ULONG);
1288#ifdef DEBUG_MARSHAL_DETAIL
1289 DbgP(
"marshal_nfs41_setacl: class=0x%x sec_desc_len=%lu\n",
1314#ifdef DEBUG_INVALIDATE_CACHE
1315 DbgP(
"nfs41_invalidate_cache: received srv_open=%p %wZ\n",
1340 switch(
entry->opcode) {
1431 entry->opcode = opcode;
1434 entry->open_state = open_state;
1444 if (clnt_sec_ctx ==
NULL) {
1451 1, &
entry->sec_ctx);
1454 "SeCreateClientSecurityFromSubjectContext failed with %x\n",
1461 entry->psec_ctx = clnt_sec_ctx;
1476 if (!
entry->async_op) {
1490#define MAKE_WAITONCLOSE_NONITERRUPTABLE
1491#ifdef MAKE_WAITONCLOSE_NONITERRUPTABLE
1524 DbgP(
"[upcall] abandoning %s entry=%p xid=%lld\n",
1558 RxContext->InformationToReturn = 0;
1560 RxContext->InformationToReturn =
len;
1579 unsigned char **
buf)
1584 *
buf +=
sizeof(tmp->
xid);
1591#ifdef DEBUG_MARSHAL_HEADER
1592 DbgP(
"[downcall header] xid=%lld opcode=%s status=%d errno=%d\n", tmp->
xid,
1599 unsigned char **
buf)
1608#ifdef DEBUG_MARSHAL_DETAIL
1609 DbgP(
"unmarshal_nfs41_mount: session pointer 0x%x version %d lease_time "
1610 "%d\n",
cur->session,
cur->version,
cur->u.Mount.lease_time);
1617 unsigned char **
buf)
1620#ifdef DEBUG_MARSHAL_DETAIL
1621 DbgP(
"unmarshal_nfs41_setattr: returned ChangeTime %llu\n", *dest_buf);
1627 unsigned char **
buf)
1632 *
buf +=
sizeof(
cur->buf_len);
1634#ifdef DEBUG_MARSHAL_DETAIL
1635 DbgP(
"unmarshal_nfs41_rw: returned len %lu ChangeTime %llu\n",
1636 cur->buf_len,
cur->ChangeTime);
1649 print_error(
"Call to MmUnmapLockedPages failed due to"
1650 " exception 0x%0x\n",
code);
1659 unsigned char **
buf)
1664 if (
cur->u.Open.EaBuffer)
1690 cur->u.Open.symlink.Length =
cur->u.Open.symlink.MaximumLength -
1694 if (
cur->u.Open.symlink.Buffer ==
NULL) {
1700 cur->u.Open.symlink.MaximumLength);
1701#ifdef DEBUG_MARSHAL_DETAIL
1702 DbgP(
"unmarshal_nfs41_open: ERROR_REPARSE -> '%wZ'\n", &
cur->u.Open.symlink);
1705#ifdef DEBUG_MARSHAL_DETAIL
1706 DbgP(
"unmarshal_nfs41_open: open_state 0x%x mode %o changeattr %llu "
1707 "deleg_type %d\n",
cur->open_state,
cur->u.Open.mode,
1708 cur->ChangeTime,
cur->u.Open.deleg_type);
1716 unsigned char **
buf)
1722#ifdef DEBUG_MARSHAL_DETAIL
1723 DbgP(
"unmarshal_nfs41_dirquery: reply size %d\n", buf_len);
1734 if (buf_len >
cur->buf_len)
1736 cur->buf_len = buf_len;
1745 unsigned char **
buf)
1749 if (buf_len > *attr_len) {
1754 *attr_len = buf_len;
1761 unsigned char **
buf)
1775 unsigned char **
buf)
1779#ifdef DEBUG_MARSHAL_DETAIL
1781 DbgP(
"[unmarshal_nfs41_getattr] ChangeTime %llu\n",
cur->ChangeTime);
1787 unsigned char **
buf)
1801 if (buf_len >
cur->buf_len)
1803 cur->buf_len = buf_len;
1811 unsigned char **
buf)
1813 if (
cur->u.Symlink.set)
return;
1817 if (
cur->u.Symlink.target->Length >
1818 cur->u.Symlink.target->MaximumLength) {
1823 cur->u.Symlink.target->Length);
1852 if (
cur->xid == tmp->
xid) {
1869 DbgP(
"[downcall] Nobody is waiting for this request!!!\n");
1870 switch(
cur->opcode) {
1877 cur->u.QueryFile.mdl);
1881 if (
cur->u.Open.EaMdl) {
1941 if (
cur->async_op) {
1944 cur->u.ReadWrite.rxcontext->InformationToReturn =
1947 cur->u.ReadWrite.rxcontext->StoredStatus =
1949 cur->u.ReadWrite.rxcontext->InformationToReturn = 0;
2012 0,
NULL, &SecurityDesc);
2022 DbgP(
"section already created; returning success\n");
2026 DbgP(
"ZwCreateSection failed with %08X\n",
status);
2127 USHORT NameLength, EaPadding;
2135 pConnectionName->Length = pConnectionName->MaximumLength = 0;
2152 if (BufferLen != BufferLenExpected) {
2154 print_error(
"Received buffer of length %lu, but expected %lu bytes.\n",
2155 BufferLen, BufferLenExpected);
2156 pConnectionName->Length = pConnectionName->MaximumLength = 0;
2162 pConnectionName->Buffer = (
PWCH)
ptr;
2163 pConnectionName->Length = NameLength -
sizeof(
WCHAR);
2164 pConnectionName->MaximumLength = NameLength;
2167 *ppEaBuffer =
ptr + NameLength + EaPadding;
2194 DbgP(
"returning STATUS_PENDING\n");
2215#ifdef ENABLE_TIMINGS
2220 DbgP(
"%-9s: num_ops=%-10d delta_ticks=%-10d size=%-10d\n",
op_str,
2250#ifdef ENABLE_TIMINGS
2251 print_op_stat(
"lookup", &
lookup, 1);
2252 print_op_stat(
"open", &
open, 1);
2253 print_op_stat(
"close", &
close, 1);
2254 print_op_stat(
"volume", &
volume, 1);
2255 print_op_stat(
"getattr", &getattr, 1);
2256 print_op_stat(
"setattr", &setattr, 1);
2257 print_op_stat(
"getexattr", &getexattr, 1);
2258 print_op_stat(
"setexattr", &setexattr, 1);
2259 print_op_stat(
"readdir", &
readdir, 1);
2260 print_op_stat(
"getacl", &getacl, 1);
2261 print_op_stat(
"setacl", &setacl, 1);
2262 print_op_stat(
"read", &
read, 1);
2263 print_op_stat(
"write", &
write, 1);
2264 print_op_stat(
"lock", &
lock, 1);
2265 print_op_stat(
"unlock", &unlock, 1);
2293 DbgP(
"returning STATUS_PENDING\n");
2317 DbgP(
"Calling RxFinalizeConnection for NetRoot %p from VNetRoot %p\n",
2343 UCHAR op = RxContext->MajorFunction;
2349 DWORD nfs41d_version = 0;
2376 if (RxContext->RxDeviceObject->NumberOfActiveFcbs > 0) {
2377 DbgP(
"device has open handles %d\n",
2378 RxContext->RxDeviceObject->NumberOfActiveFcbs);
2380 if (RxContext->RxDeviceObject->pRxNetNameTable !=
NULL)
2382#define DUMP_FCB_TABLE_FROM_NETROOT(N) \
2385 BOOLEAN Release2 = FALSE; \
2386 if (!RxIsFcbTableLockAcquired(&(N)->FcbTable)) \
2388 RxAcquireFcbTableLockExclusive(&(N)->FcbTable, TRUE); \
2391 for (Bucket2 = 0; Bucket2 < (N)->FcbTable.NumberOfBuckets; ++Bucket2) \
2393 PLIST_ENTRY Entry2; \
2394 for (Entry2 = (N)->FcbTable.HashBuckets[Bucket2].Flink; \
2395 Entry2 != &(N)->FcbTable.HashBuckets[Bucket2]; \
2396 Entry2 = Entry2->Flink) \
2399 Fcb = CONTAINING_RECORD(Entry2, FCB, FcbTableEntry.HashLinks); \
2400 DbgP("Fcb: %p still has %d references\n", Fcb, Fcb->NodeReferenceCount); \
2401 DbgP("It is for: %wZ\n", &Fcb->FcbTableEntry.Path); \
2406 RxReleaseFcbTableLock(&(N)->FcbTable); \
2418 for (Bucket = 0; Bucket < RxContext->RxDeviceObject->pRxNetNameTable->TableSize; ++Bucket)
2422 for (
Entry = RxContext->RxDeviceObject->pRxNetNameTable->HashBuckets[Bucket].Flink;
2423 Entry != &RxContext->RxDeviceObject->pRxNetNameTable->HashBuckets[Bucket];
2435 NetRoot = Container;
2436 DUMP_FCB_TABLE_FROM_NETROOT(NetRoot);
2444 VNetRoot = Container;
2450 DUMP_FCB_TABLE_FROM_NETROOT(NetRoot);
2468#undef DUMP_FCB_TABLE_FROM_NETROOT
2472 DbgP(
"RxNetNameTable is NULL for: %p\n", RxContext->RxDeviceObject);
2499 RxContext->InformationToReturn =
sizeof(
ULONG);
2506 if (in_len >=
sizeof(
DWORD)) {
2508 DbgP(
"NFS41 Daemon sent start request with version %d\n",
2510 DbgP(
"Currently used NFS41 Daemon version is %d\n",
2511 DevExt->nfs41d_version);
2512 DevExt->nfs41d_version = nfs41d_version;
2524 DbgP(
"redirector started\n");
2527 RxContext->PostRequest ==
TRUE) {
2528 DbgP(
"RxStartMinirdr pending %08lx\n",
status);
2542 if (RxContext->RxDeviceObject->NumberOfActiveFcbs > 0) {
2543 DbgP(
"device has open handles %d\n",
2544 RxContext->RxDeviceObject->NumberOfActiveFcbs);
2555 DbgP(
"RxStopMinirdr status %08lx\n",
status);
2592 pSrvCall = SrvCalldownStructure->
SrvCall;
2600 DbgP(
"SrvCall: Connection Name Length: %d %wZ\n",
2605 print_error(
"Server name '%wZ' too long for server entry (max %u)\n",
2614 if (pServerEntry ==
NULL) {
2635 SrvCalldownStructure->
CallBack(SCCBC);
2645 PVOID pCallbackContext)
2665 DbgP(
"executing with RDBSS context\n");
2670 _nfs41_CreateSrvCall_v, pCallbackContext);
2675 print_error(
"RxDispatchToWorkerThread returned status %08lx\n",
2703 if (!ThisMinirdrIsTheWinner) {
2708 pSrvCall->Context = pServerEntry;
2723 print_error(
"failed to map windows error %d to NTSTATUS; "
2724 "defaulting to STATUS_INSUFFICIENT_RESOURCES\n",
status);
2741 DbgP(
"Server Name %wZ Mount Point %wZ SecFlavor %d\n",
2753 entry->u.Mount.FsAttrs = FsAttrs;
2786 Config->SrvName.Length = 0;
2789 Config->MntPt.Length = 0;
2792 Config->SecFlavor.Length = 0;
2808 if (Option->EaValueLength == 0 || *usValue->Buffer ==
L'1')
2813 DbgP(
" '%ls' -> '%wZ' -> %u\n",
2828 if (Option->EaValueLength) {
2831#ifdef IMPOSE_MINMAX_RWSIZES
2832 if (*
Value < Minimum)
2834 if (*
Value > Maximum)
2840 print_error(
"Failed to convert %s='%wZ' to unsigned long.\n",
2913 print_error(
"Unrecognized option '%ls' -> '%wZ'\n",
2933 if (NetRootName->Length == SrvCallName->Length + NfsPrefix.Length) {
2936 NetRootName->MaximumLength - SrvCallName->Length,
2937 &NetRootName->Buffer[SrvCallName->Length/2]
2977 print_error(
"nfs41_GetLUID: SeCreateClientSecurityFromSubjectContext "
2979 goto release_sec_ctx;
2984 goto release_clnt_sec_ctx;
2986release_clnt_sec_ctx:
3009 print_error(
"SeCreateClientSecurityFromSubjectContext "
3010 "failed with %x\n",
status);
3013 DbgP(
"Created client security token %p\n", out_ctx->ClientToken);
3030 pCreateNetRootContext->pVNetRoot;
3038 DWORD nfs41d_version = DevExt->nfs41d_version;
3052 DbgP(
"pVNetRoot=%p pNetRoot=%p pSrvCall=%p\n", pVNetRoot, pNetRoot, pSrvCall);
3053 DbgP(
"pNetRoot=%wZ Type=%d pSrvCallName=%wZ VirtualNetRootStatus=0x%x "
3054 "NetRootStatus=0x%x\n", pNetRoot->pNetRootName,
3055 pNetRoot->Type, pSrvCall->pSrvCallName,
3056 pCreateNetRootContext->VirtualNetRootStatus,
3057 pCreateNetRootContext->NetRootStatus);
3061 print_error(
"nfs41_CreateVNetRoot: Unsupported NetRoot Type %u\n",
3073 print_error(
"nfs41_CreateVNetRoot: NetRootName %wZ doesn't match "
3074 "'\\nfs4'!\n", pNetRoot->pNetRootName);
3088 if (pCreateNetRootContext->RxContext->Create.EaLength) {
3091 pCreateNetRootContext->RxContext->Create.EaBuffer,
3092 pCreateNetRootContext->RxContext->Create.EaLength,
3096 pVNetRootContext->read_only =
Config->ReadOnly;
3097 pVNetRootContext->write_thru =
Config->write_thru;
3098 pVNetRootContext->nocache =
Config->nocache;
3101 Config->SrvName.Buffer = pSrvCall->pSrvCallName->Buffer + 1;
3103 pSrvCall->pSrvCallName->Length -
sizeof(
WCHAR);
3104 Config->SrvName.MaximumLength =
3105 pSrvCall->pSrvCallName->MaximumLength -
sizeof(
WCHAR);
3107 pVNetRootContext->MountPathLen =
Config->MntPt.Length;
3108 pVNetRootContext->timeout =
Config->timeout;
3112 DbgP(
"Invalid rpcsec security flavor %wZ\n", &
Config->SecFlavor);
3120 if (!pNetRootContext->mounts_init) {
3122 DbgP(
"Initializing mount array\n");
3126 pNetRootContext->mounts_init =
TRUE;
3131 pEntry = &pNetRootContext->mounts.head;
3142 DbgP(
"Found a matching LUID entry\n");
3144 found_existing_mount =
TRUE;
3145 switch(pVNetRootContext->sec_flavor) {
3148 pVNetRootContext->session =
3153 pVNetRootContext->session = existing_mount->
gss_session;
3157 pVNetRootContext->session = existing_mount->
gssi_session;
3161 pVNetRootContext->session = existing_mount->
gssp_session;
3164 if (pVNetRootContext->session &&
3166 found_matching_flavor = 1;
3169 if (
pEntry->
Flink == &pNetRootContext->mounts.head)
3175 if (!found_matching_flavor)
3176 DbgP(
"Didn't find matching security flavor\n");
3182 &pVNetRootContext->session, &nfs41d_version,
3183 &pVNetRootContext->FsAttrs);
3187 pNetRootContext->mounts, MountsEmpty);
3188 if (!found_existing_mount && MountsEmpty)
3189 pNetRootContext->mounts_init =
FALSE;
3193 pVNetRootContext->timeout =
Config->timeout;
3195 if (!found_existing_mount) {
3204 entry->authsys_session =
entry->gss_session =
3206 switch (pVNetRootContext->sec_flavor) {
3208 entry->authsys_session = pVNetRootContext->session;
break;
3210 entry->gss_session = pVNetRootContext->session;
break;
3212 entry->gssi_session = pVNetRootContext->session;
break;
3214 entry->gssp_session = pVNetRootContext->session;
break;
3218 pNetRootContext->mounts,
entry);
3219 }
else if (!found_matching_flavor) {
3223 DbgP(
"Using existing %d flavor session 0x%x\n",
3224 pVNetRootContext->sec_flavor);
3226 switch (pVNetRootContext->sec_flavor) {
3230 existing_mount->
gss_session = pVNetRootContext->session;
break;
3232 existing_mount->
gssi_session = pVNetRootContext->session;
break;
3234 existing_mount->
gssp_session = pVNetRootContext->session;
break;
3237 pNetRootContext->nfs41d_version = nfs41d_version;
3239 DbgP(
"Saving new session 0x%x\n", pVNetRootContext->session);
3241#ifdef STORE_MOUNT_SEC_CONTEXT
3243 &pVNetRootContext->mount_sec_ctx);
3249 pCreateNetRootContext->VirtualNetRootStatus =
status;
3250 if (pNetRoot->Context ==
NULL)
3251 pCreateNetRootContext->NetRootStatus =
status;
3252 pCreateNetRootContext->Callback(pCreateNetRootContext);
3274 PWCH w = FilePathName->Buffer;
3278 w += (SrvCall->pSrvCallName->Length/
sizeof(
WCHAR));
3279 NetRootName->Buffer = wlow =
w;
3292 NetRootName->Length = NetRootName->MaximumLength
3295 DbgP(
"In: pSrvCall %p PathName=%wZ SrvCallName=%wZ Out: NetRootName=%wZ\n",
3296 SrvCall, FilePathName, SrvCall->pSrvCallName, NetRootName);
3318 if (pSrvCall->Context ==
NULL)
3330 pSrvCall->Context =
NULL;
3363 print_error(
"nfs41_FinalizeNetRoot: No valid session established\n");
3375 pNetRootContext->
mounts, mount_tmp);
3376 if (mount_tmp ==
NULL)
3379 DbgP(
"Removing entry luid %x.%x from mount list\n",
3392 print_error(
"nfs41_unmount RPCSEC_GSS_KRB5 failed with %d\n",
3399 print_error(
"nfs41_unmount RPCSEC_GSS_KRB5I failed with %d\n",
3406 print_error(
"nfs41_unmount RPCSEC_GSS_KRB5P failed with %d\n",
3419 DbgP(
"Removing entry from upcall list\n");
3430 DbgP(
"Removing entry from downcall list\n");
3462#ifdef STORE_MOUNT_SEC_CONTEXT
3465 DbgP(
"nfs41_FinalizeVNetRoot: deleting security context: %p\n",
3501 for (
i = 0;
i <
name->Length / 2;
i++) {
3504 if (
p[0] ==
L'\0')
return FALSE;
3518 for (
i = 0;
i <
name->Length / 2;
i++) {
3519 if (
p[0] ==
L':')
return TRUE;
3520 else if (
p[0] ==
L'\0')
return FALSE;
3572 print_error(
"[ERROR] nfs41_Create: upcall returned %d returning "
3573 "STATUS_INSUFFICIENT_RESOURCES\n",
status);
3582 switch(disposition) {
3596 print_error(
"unknown disposition %d\n", disposition);
3606 if (
AnsiStrEq(&NfsV3Attributes, ea->EaName, ea->EaNameLength)
3607 ||
AnsiStrEq(&NfsActOnLink, ea->EaName, ea->EaNameLength)
3608 ||
AnsiStrEq(&NfsSymlinkTargetName, ea->EaName, ea->EaNameLength))
3625 &pVNetRootContext->FsAttrs;
3631 RxContext->CurrentIrp->AssociatedIrp.SystemBuffer;
3635 print_error(
"nfs41_Create: Unsupported NetRoot Type %u\n",
3636 Fcb->pNetRoot->Type);
3642 print_error(
"FCB_STATE_PAGING_FILE not implemented\n");
3647 if (!pNetRootContext->mounts_init) {
3648 print_error(
"nfs41_Create: No valid session established\n");
3653 if (
isStream(SrvOpen->pAlreadyPrefixedName)) {
3658 if (pVNetRootContext->read_only &&
3674 if (
Fcb->
OpenCount && nfs41_fcb->StandardInfo.DeletePending &&
3685 if ((!RxContext->CurrentIrpSp->FileObject->SharedRead &&
3687 ((!RxContext->CurrentIrpSp->FileObject->SharedWrite &&
3690 (!RxContext->CurrentIrpSp->FileObject->SharedDelete &&
3693 if ((!RxContext->CurrentIrpSp->FileObject->SharedRead &&
3695 (!RxContext->CurrentIrpSp->FileObject->SharedWrite &&
3698 (!RxContext->CurrentIrpSp->FileObject->SharedDelete &&
3724 if (!
AnsiStrEq(&NfsV3Attributes, ea->EaName, ea->EaNameLength) &&
3725 !
AnsiStrEq(&NfsActOnLink, ea->EaName, ea->EaNameLength) &&
3726 !
AnsiStrEq(&NfsSymlinkTargetName, ea->EaName, ea->EaNameLength)) {
3732 }
else if (RxContext->CurrentIrpSp->Parameters.Create.EaLength) {
3752 RxContext->CurrentIrp->AssociatedIrp.SystemBuffer;
3761 BOOLEAN oldDeletePending = nfs41_fcb->StandardInfo.DeletePending;
3762#ifdef ENABLE_TIMINGS
3779#if defined(STORE_MOUNT_SEC_CONTEXT) && defined (USE_MOUNT_SEC_CONTEXT)
3785 pNetRootContext->nfs41d_version,
3786 SrvOpen->pAlreadyPrefixedName, &
entry);
3789 entry->u.Open.access_mask =
params->DesiredAccess;
3796 entry->u.Open.srv_open = SrvOpen;
3805 entry->u.Open.mode = 0777;
3806 if (ea && AnsiStrEq(&NfsV3Attributes, ea->EaName, ea->EaNameLength)) {
3807 nfs3_attrs *attrs = (nfs3_attrs *)(ea->EaName + ea->EaNameLength + 1);
3809 DbgP(
"creating file with mode %o\n", attrs->mode);
3811 entry->u.Open.mode = attrs->mode;
3814 entry->u.Open.mode = 0444;
3817 AnsiStrEq(&NfsSymlinkTargetName, ea->EaName, ea->EaNameLength)) {
3819 entry->u.Open.symlink.Buffer = (PWCH)(ea->EaName + ea->EaNameLength + 1);
3820 entry->u.Open.symlink.MaximumLength = entry->u.Open.symlink.Length = ea->EaValueLength;
3825 entry->u.Open.EaMdl = IoAllocateMdl(ea,
3826 RxContext->CurrentIrpSp->Parameters.Create.EaLength,
3827 FALSE, FALSE, NULL);
3828 if (entry->u.Open.EaMdl == NULL) {
3829 status = STATUS_INTERNAL_ERROR;
3838#ifndef USE_MOUNT_SEC_CONTEXT
3843 if (
entry->u.Open.EaMdl) {
3856 RxContext->pRelevantSrvOpen->pVNetRoot;
3865 VNetRootPrefix->Length +
entry->u.Open.symlink.Length;
3866 AbsPath.MaximumLength = AbsPath.Length +
sizeof(
UNICODE_NULL);
3869 if (AbsPath.Buffer ==
NULL) {
3879 buf += VNetRootPrefix->Length;
3881 entry->u.Open.symlink.Length);
3883 buf +=
entry->u.Open.symlink.Length;
3887 entry->u.Open.symlink_embedded, &AbsPath,
TRUE, &ReparseRequired);
3889 DbgP(
"RxPrepareToReparseSymbolicLink(%u, '%wZ') returned %08lX, "
3890 "FileName is '%wZ'\n",
entry->u.Open.symlink_embedded,
3891 &AbsPath,
status, &RxContext->CurrentIrpSp->FileObject->FileName);
3897 if (!ReparseRequired) {
3898 entry->u.Open.symlink.Length = 0;
3908 SrvOpen->pAlreadyPrefixedName->Length);
3922 if (RxContext->pFobx ==
NULL) {
3927 DbgP(
"nfs41_Create: created FOBX %p\n", RxContext->pFobx);
3929 nfs41_fobx = (
PNFS41_FOBX)(RxContext->pFobx)->Context;
3930 nfs41_fobx->nfs41_open_state =
entry->open_state;
3931#ifndef USE_MOUNT_SEC_CONTEXT
3936 RtlCopyMemory(&nfs41_fobx->sec_ctx, &pVNetRootContext->mount_sec_ctx,
3937 sizeof(nfs41_fobx->sec_ctx));
3943 nfs41_fcb->changeattr !=
entry->ChangeTime)) {
3947 sizeof(
entry->u.Open.binfo));
3949 sizeof(
entry->u.Open.sinfo));
3950 nfs41_fcb->mode =
entry->u.Open.mode;
3951 nfs41_fcb->changeattr =
entry->ChangeTime;
3953 !pVNetRootContext->read_only) || oldDeletePending)
3954 nfs41_fcb->StandardInfo.DeletePending =
TRUE;
3957 &
entry->u.Open.binfo.FileAttributes,
3958 &
entry->u.Open.sinfo.NumberOfLinks,
3959 &
entry->u.Open.binfo.CreationTime,
3960 &
entry->u.Open.binfo.LastAccessTime,
3961 &
entry->u.Open.binfo.LastWriteTime,
3962 &
entry->u.Open.binfo.ChangeTime,
3963 &
entry->u.Open.sinfo.AllocationSize,
3964 &
entry->u.Open.sinfo.EndOfFile,
3965 &
entry->u.Open.sinfo.EndOfFile);
3967 if (
entry->u.Open.sinfo.Directory)
3977 DbgP(
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n");
3990 nfs41_fcb->changeattr !=
entry->ChangeTime) &&
3991 !nfs41_fcb->StandardInfo.Directory) {
3994 DbgP(
"nfs41_Create: reopening (changed) file %wZ\n",
3995 SrvOpen->pAlreadyPrefixedName);
3999 if (!nfs41_fcb->StandardInfo.Directory &&
4001 nfs41_fobx->deleg_type =
entry->u.Open.deleg_type;
4003 DbgP(
"nfs41_Create: received delegation %d\n",
entry->u.Open.deleg_type);
4006 !pVNetRootContext->write_thru &&
4007 (
entry->u.Open.deleg_type == 2 ||
4010 DbgP(
"nfs41_Create: enabling write buffering\n");
4012 SrvOpen->BufferingFlags |=
4016 pVNetRootContext->write_thru)
4017 nfs41_fobx->write_thru =
TRUE;
4018 if (
entry->u.Open.deleg_type >= 1 ||
4021 DbgP(
"nfs41_Create: enabling read buffering\n");
4023 SrvOpen->BufferingFlags |=
4027 if (pVNetRootContext->nocache ||
4030 DbgP(
"nfs41_Create: disabling buffering\n");
4033 nfs41_fobx->nocache =
TRUE;
4037 DbgP(
"nfs41_Create: received no delegations: srv_open=%p "
4038 "ctime=%llu\n", SrvOpen,
entry->ChangeTime);
4042 if (oentry ==
NULL) {
4046 oentry->
fcb = RxContext->pFcb;
4048 oentry->
session = pVNetRootContext->session;
4056 !pVNetRootContext->read_only)
4057 nfs41_fcb->StandardInfo.DeletePending =
TRUE;
4059 RxContext->Create.ReturnedCreateInformation =
4062 RxContext->pFobx->OffsetOfNextEaToReturn = 1;
4064 RxContext->CurrentIrp->IoStatus.Information =
4065 RxContext->Create.ReturnedCreateInformation;
4073#ifdef ENABLE_TIMINGS
4081#ifdef ENABLE_INDV_TIMINGS
4082 DbgP(
"nfs41_Create open delta = %d op=%d sum=%d\n",
4083 t2.QuadPart - t1.QuadPart,
open.tops,
open.ticks);
4088#ifdef ENABLE_INDV_TIMINGS
4089 DbgP(
"nfs41_Create lookup delta = %d op=%d sum=%d\n",
4120 if (RxContext->pRelevantSrvOpen ==
NULL)
4140 DbgP(
"input: byte count 0x%x filesize 0x%x alloc size 0x%x\n",
4142 *pNewAllocationSize);
4144 pNewAllocationSize->QuadPart = pNewFileSize->QuadPart + 8192;
4145 nfs41_fcb->StandardInfo.AllocationSize.QuadPart =
4146 pNewAllocationSize->QuadPart;
4147 nfs41_fcb->StandardInfo.EndOfFile.QuadPart = pNewFileSize->QuadPart;
4149 DbgP(
"new filesize 0x%x new allocation size 0x%x\n", *pNewFileSize,
4150 *pNewAllocationSize);
4171 DbgP(
"nfs41_remove_srvopen_entry: Found match for fcb=%p\n",
fcb);
4179 DbgP(
"nfs41_remove_srvopen_entry: reached EOL looking for fcb "
4198 print_error(
"failed to map windows error %d to NTSTATUS; "
4199 "defaulting to STATUS_INTERNAL_ERROR\n",
status);
4220#ifdef ENABLE_TIMINGS
4230 if (!nfs41_fobx->deleg_type && !nfs41_fcb->StandardInfo.Directory &&
4231 !RxContext->pFcb->OpenCount) {
4236 pVNetRootContext->session, nfs41_fobx->nfs41_open_state,
4237 pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
4240 entry->u.Close.srv_open = SrvOpen;
4241 if (nfs41_fcb->StandardInfo.DeletePending)
4242 nfs41_fcb->DeletePending =
TRUE;
4243 if (!RxContext->pFcb->OpenCount ||
4244 (nfs41_fcb->StandardInfo.DeletePending &&
4245 nfs41_fcb->StandardInfo.Directory))
4246 entry->u.Close.remove = nfs41_fcb->StandardInfo.DeletePending;
4247 if (!RxContext->pFcb->OpenCount)
4248 entry->u.Close.renamed = nfs41_fcb->Renamed;
4251#ifndef USE_MOUNT_SEC_CONTEXT
4260#ifdef ENABLE_TIMINGS
4264#ifdef ENABLE_INDV_TIMINGS
4265 DbgP(
"nfs41_CloseSrvOpen delta = %d op=%d sum=%d\n",
4303 if (nfs41_fobx->acl)
4312 DbgP(
"FileName='%wZ', InfoClass = %s\n",
4321 DbgP(
"Filter='%wZ', Index=%d, Restart/Single/Specified/Init=%d/%d/%d/%d\n",
4343 print_error(
"failed to map windows error %d to NTSTATUS; "
4344 "defaulting to STATUS_INVALID_NETWORK_RESPONSE\n",
status);
4352 if (RxContext->Info.Buffer ==
NULL)
4374#ifdef ENABLE_TIMINGS
4379#ifdef DEBUG_DIR_QUERY
4387 switch (InfoClass) {
4397 print_error(
"nfs41_QueryDirectory: unhandled dir query class %d\n",
4403 pVNetRootContext->session, nfs41_fobx->nfs41_open_state,
4404 pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
4407 entry->u.QueryFile.InfoClass = InfoClass;
4408 entry->buf_len = RxContext->Info.LengthRemaining;
4409 entry->buf = RxContext->Info.Buffer;
4421 entry->u.QueryFile.initial_query = RxContext->QueryDirectory.InitialQuery;
4422 entry->u.QueryFile.restart_scan = RxContext->QueryDirectory.RestartScan;
4423 entry->u.QueryFile.return_single = RxContext->QueryDirectory.ReturnSingleEntry;
4430 DbgP(
"nfs41_QueryDirectory: buffer too small provided %d need %lu\n",
4431 RxContext->Info.LengthRemaining,
entry->buf_len);
4432 RxContext->InformationToReturn =
entry->buf_len;
4435#ifdef ENABLE_TIMINGS
4439 RxContext->Info.LengthRemaining -=
entry->buf_len;
4448#ifdef ENABLE_TIMINGS
4452#ifdef ENABLE_INDV_TIMINGS
4453 DbgP(
"nfs41_QueryDirectory delta = %d ops=%d sum=%d\n",
4457#ifdef DEBUG_DIR_QUERY
4467 DbgP(
"FileName='%wZ', InfoClass = %s BufferLen = %d\n",
4470 RxContext->
Info.LengthRemaining);
4483 print_error(
"failed to map windows error %d to NTSTATUS; "
4484 "defaulting to STATUS_INVALID_NETWORK_RESPONSE\n",
status);
4497 VolName.MaximumLength);
4511 const USHORT RootPathLen = VNetRoot->PrefixEntry.Prefix.Length +
4512 pVNetRootContext->MountPathLen +
sizeof(
WCHAR);
4526 ULONG RemainingLength = RxContext->Info.LengthRemaining, SizeUsed;
4536#ifdef ENABLE_TIMINGS
4541#ifdef DEBUG_VOLUME_QUERY
4550 RtlZeroMemory(RxContext->Info.Buffer, RxContext->Info.LengthRemaining);
4553 switch (InfoClass) {
4555 if ((
ULONG)RxContext->Info.LengthRemaining >= DevExt->VolAttrsLen) {
4557 DevExt->VolAttrsLen);
4558 RxContext->Info.LengthRemaining -= DevExt->VolAttrsLen;
4562 RxContext->Info.LengthRemaining);
4571 if (RemainingLength < SizeUsed) {
4573 RxContext->InformationToReturn = SizeUsed;
4576 pDevInfo->
DeviceType = RxContext->pFcb->pNetRoot->DeviceType;
4578 RxContext->Info.LengthRemaining -= SizeUsed;
4587 if (RxContext->Info.LengthRemaining <
FS_ATTR_LEN) {
4601 sizeof(pVNetRootContext->FsAttrs));
4605 FsName.MaximumLength);
4617 print_error(
"nfs41_QueryVolumeInformation: unhandled class %d\n", InfoClass);
4622 pVNetRootContext->session, nfs41_fobx->nfs41_open_state,
4623 pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
4626 entry->u.Volume.query = InfoClass;
4627 entry->buf = RxContext->Info.Buffer;
4628 entry->buf_len = RxContext->Info.LengthRemaining;
4634 RxContext->InformationToReturn =
entry->buf_len;
4644 FsName.MaximumLength);
4649#ifdef ENABLE_TIMINGS
4653 RxContext->Info.LengthRemaining -=
entry->buf_len;
4660#ifdef ENABLE_TIMINGS
4664#ifdef ENABLE_INDV_TIMINGS
4665 DbgP(
"nfs41_QueryVolumeInformation delta = %d op=%d sum=%d\n",
4669#ifdef DEBUG_VOLUME_QUERY
4687 cur->ChangeTime != ChangeTime) {
4688#if defined(DEBUG_FILE_SET) || defined(DEBUG_ACL_SET) || \
4689 defined(DEBUG_WRITE) || defined(DEBUG_EA_SET)
4690 DbgP(
"nfs41_update_fcb_list: Found match for fcb %p: updating "
4691 "%llu to %llu\n",
fcb,
cur->ChangeTime, ChangeTime);
4693 cur->ChangeTime = ChangeTime;
4698#if defined(DEBUG_FILE_SET) || defined(DEBUG_ACL_SET) || \
4699 defined(DEBUG_WRITE) || defined(DEBUG_EA_SET)
4700 DbgP(
"nfs41_update_fcb_list: reached EOL loooking for "
4713 DbgP(
"type=%d mode=%o nlink=%d size=%d atime=%x mtime=%x ctime=%x\n",
4724 *nfs_time = diff.
QuadPart / 10000000;
4765 print_error(
"failed to map windows error %d to NTSTATUS; "
4766 "defaulting to STATUS_INVALID_PARAMETER\n",
error);
4778 &pVNetRootContext->FsAttrs;
4789 if (
AnsiStrEq(&NfsActOnLink, ea->EaName, ea->EaNameLength) ||
4790 AnsiStrEq(&NfsSymlinkTargetName, ea->EaName, ea->EaNameLength)) {
4796 && !
AnsiStrEq(&NfsV3Attributes, ea->EaName, ea->EaNameLength)) {
4800 if ((RxContext->pRelevantSrvOpen->DesiredAccess &
FILE_WRITE_EA) == 0) {
4804 if (pVNetRootContext->read_only) {
4805 print_error(
"check_nfs41_setattr_args: Read-only mount\n");
4825 ULONG buflen = RxContext->CurrentIrpSp->Parameters.SetEa.Length, error_offset;
4833#ifdef ENABLE_TIMINGS
4848 pVNetRootContext->session, nfs41_fobx->nfs41_open_state,
4849 pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
4852 if (
AnsiStrEq(&NfsV3Attributes, eainfo->EaName, eainfo->EaNameLength)) {
4853 attrs = (
nfs3_attrs *)(eainfo->EaName + eainfo->EaNameLength + 1);
4856 DbgP(
"old mode is %o new mode is %o\n", nfs41_fcb->mode, attrs->mode);
4858 entry->u.SetEa.mode = attrs->mode;
4860 entry->u.SetEa.mode = 0;
4867 entry->buf = eainfo;
4868 entry->buf_len = buflen;
4872#ifdef ENABLE_TIMINGS
4880 if (!nfs41_fobx->deleg_type &&
entry->ChangeTime &&
4881 (SrvOpen->DesiredAccess &
4884 nfs41_fcb->changeattr =
entry->ChangeTime;
4885 nfs41_fcb->mode =
entry->u.SetEa.mode;
4889#ifdef ENABLE_TIMINGS
4893#ifdef ENABLE_INDV_TIMINGS
4894 DbgP(
"nfs41_SetEaInformation delta = %d op=%d sum=%d\n",
4911 &pVNetRootContext->FsAttrs;
4913 RxContext->CurrentIrpSp->Parameters.QueryEa.EaList;
4931 if ((RxContext->pRelevantSrvOpen->DesiredAccess &
FILE_READ_EA) == 0) {
4953 query->EaNameLength + 1;
4956 if (RxContext->Info.LengthRemaining < HeaderLen) {
4958 RxContext->InformationToReturn = HeaderLen;
4967 VNetRootContext->session, Fobx->nfs41_open_state,
4968 NetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
4979 info->NextEntryOffset = 0;
4981 info->EaNameLength =
query->EaNameLength;
4985 RxContext->Info.LengthRemaining = HeaderLen +
info->EaValueLength;
4987 RxContext->InformationToReturn = HeaderLen +
4988 entry->u.Symlink.target->Length;
5012 NfsSymlinkTargetName.Length -
sizeof(
CHAR);
5013 if (LengthRequired > RxContext->Info.LengthRemaining) {
5015 RxContext->InformationToReturn = LengthRequired;
5018 info->NextEntryOffset = 0;
5020 info->EaValueLength = 0;
5021 info->EaNameLength = (
UCHAR)NfsActOnLink.Length;
5023 NfsSymlinkTargetName.Length);
5024 RxContext->Info.LengthRemaining = LengthRequired;
5035 if (LengthRequired > RxContext->Info.LengthRemaining) {
5037 RxContext->InformationToReturn = LengthRequired;
5042#ifdef DEBUG_EA_QUERY
5046 info->NextEntryOffset = 0;
5048 info->EaNameLength = (
UCHAR)NfsV3Attributes.Length;
5051 NfsV3Attributes.Length);
5054 RxContext->Info.LengthRemaining = LengthRequired;
5063 if (LengthRequired > RxContext->Info.LengthRemaining) {
5065 RxContext->InformationToReturn = LengthRequired;
5069 info->NextEntryOffset = 0;
5071 info->EaNameLength =
query->EaNameLength;
5072 info->EaValueLength = 0;
5074 RxContext->Info.LengthRemaining = LengthRequired;
5092 RxContext->CurrentIrpSp->Parameters.QueryEa.EaList;
5093 ULONG buflen = RxContext->CurrentIrpSp->Parameters.QueryEa.Length;
5100#ifdef ENABLE_TIMINGS
5105#ifdef DEBUG_EA_QUERY
5120 pVNetRootContext->session, nfs41_fobx->nfs41_open_state,
5121 pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
5124 entry->buf_len = buflen;
5125 entry->buf = RxContext->Info.Buffer;
5128 RxContext->QueryEa.UserEaListLength;
5129 entry->u.QueryEa.EaIndex = RxContext->QueryEa.IndexSpecified ?
5130 RxContext->QueryEa.UserEaIndex : 0;
5131 entry->u.QueryEa.RestartScan = RxContext->QueryEa.RestartScan;
5132 entry->u.QueryEa.ReturnSingleEntry = RxContext->QueryEa.ReturnSingleEntry;
5138 switch (
entry->u.QueryEa.Overflow) {
5149 RxContext->InformationToReturn =
entry->buf_len;
5150#ifdef ENABLE_TIMINGS
5159#ifdef ENABLE_TIMINGS
5163#ifdef ENABLE_INDV_TIMINGS
5164 DbgP(
"nfs41_QueryEaInformation delta = %d op=%d sum=%d\n",
5168#ifdef DEBUG_EA_QUERY
5184 print_error(
"failed to map windows error %d to NTSTATUS; "
5185 "defaulting to STATUS_INVALID_NETWORK_RESPONSE\n",
error);
5226 RxContext->CurrentIrpSp->Parameters.QuerySecurity.SecurityInformation;
5227#ifdef ENABLE_TIMINGS
5232#ifdef DEBUG_ACL_QUERY
5241 if (nfs41_fobx->acl && nfs41_fobx->acl_len) {
5244#ifdef DEBUG_ACL_QUERY
5245 DbgP(
"CurrentTime %lx Saved Acl time %lx\n",
5246 current_time.
QuadPart, nfs41_fobx->time.QuadPart);
5248 if (current_time.
QuadPart - nfs41_fobx->time.QuadPart <= 20*1000) {
5250 RxContext->CurrentIrp->UserBuffer;
5251 RtlCopyMemory(sec_desc, nfs41_fobx->acl, nfs41_fobx->acl_len);
5252 RxContext->IoStatusBlock.Information =
5253 RxContext->InformationToReturn = nfs41_fobx->acl_len;
5255#ifdef ENABLE_TIMINGS
5261 nfs41_fobx->acl =
NULL;
5262 nfs41_fobx->acl_len = 0;
5268 pVNetRootContext->session, nfs41_fobx->nfs41_open_state,
5269 pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
5276 entry->buf_len = RxContext->CurrentIrpSp->Parameters.QuerySecurity.Length;
5282#ifdef DEBUG_ACL_QUERY
5283 DbgP(
"nfs41_QuerySecurityInformation: provided buffer size=%d but we "
5285 RxContext->CurrentIrpSp->Parameters.QuerySecurity.Length,
5289 RxContext->InformationToReturn =
entry->buf_len;
5292 nfs41_fobx->acl =
entry->buf;
5293 nfs41_fobx->acl_len =
entry->buf_len;
5297 RxContext->CurrentIrp->UserBuffer;
5299#ifdef ENABLE_TIMINGS
5304 nfs41_fobx->acl =
NULL;
5305 nfs41_fobx->acl_len = 0;
5306 RxContext->IoStatusBlock.Information = RxContext->InformationToReturn =
5314#ifdef ENABLE_TIMINGS
5321#ifdef ENABLE_INDV_TIMINGS
5322 DbgP(
"nfs41_QuerySecurityInformation: delta = %d op=%d sum=%d\n",
5326#ifdef DEBUG_ACL_QUERY
5341 if (pVNetRootContext->read_only) {
5342 print_error(
"check_nfs41_setacl_args: Read-only mount\n");
5372 RxContext->CurrentIrpSp->Parameters.SetSecurity.SecurityDescriptor;
5375 RxContext->CurrentIrpSp->Parameters.SetSecurity.SecurityInformation;
5376#ifdef ENABLE_TIMINGS
5393 BOOLEAN present, dacl_default;
5397 DbgP(
"RtlGetDaclSecurityDescriptor failed %x\n",
status);
5400 if (present ==
FALSE) {
5401 DbgP(
"NO ACL present\n");
5407 pVNetRootContext->session, nfs41_fobx->nfs41_open_state,
5408 pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
5412 entry->buf = sec_desc;
5414#ifdef ENABLE_TIMINGS
5424 if (!nfs41_fobx->deleg_type &&
entry->ChangeTime &&
5425 (SrvOpen->DesiredAccess &
5428 nfs41_fcb->changeattr =
entry->ChangeTime;
5432#ifdef ENABLE_TIMINGS
5436#ifdef ENABLE_INDV_TIMINGS
5437 DbgP(
"nfs41_SetSecurityInformation delta = %d op=%d sum=%d\n",
5455 print_error(
"failed to map windows error %d to NTSTATUS; "
5456 "defaulting to STATUS_INVALID_NETWORK_RESPONSE\n",
error);
5478#ifdef ENABLE_TIMINGS
5483#ifdef DEBUG_FILE_QUERY
5491 switch (InfoClass) {
5508 print_error(
"nfs41_QueryFileInformation: unhandled class %d\n", InfoClass);
5514 pVNetRootContext->session, nfs41_fobx->nfs41_open_state,
5515 pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
5518 entry->u.QueryFile.InfoClass = InfoClass;
5519 entry->buf = RxContext->Info.Buffer;
5520 entry->buf_len = RxContext->Info.LengthRemaining;
5526 RxContext->InformationToReturn =
entry->buf_len;
5530#ifdef ENABLE_TIMINGS
5534 RxContext->Info.LengthRemaining -=
entry->buf_len;
5537 switch (InfoClass) {
5539 RtlCopyMemory(&nfs41_fcb->BasicInfo, RxContext->Info.Buffer,
5540 sizeof(nfs41_fcb->BasicInfo));
5541#ifdef DEBUG_FILE_QUERY
5555 if (nfs41_fcb->StandardInfo.AllocationSize.QuadPart >
5557#ifdef DEBUG_FILE_QUERY
5558 DbgP(
"Old AllocationSize is bigger: saving %x\n",
5559 nfs41_fcb->StandardInfo.AllocationSize.QuadPart);
5562 nfs41_fcb->StandardInfo.AllocationSize.QuadPart;
5564 if (nfs41_fcb->StandardInfo.EndOfFile.QuadPart >
5566#ifdef DEBUG_FILE_QUERY
5567 DbgP(
"Old EndOfFile is bigger: saving %x\n",
5568 nfs41_fcb->StandardInfo.EndOfFile);
5571 nfs41_fcb->StandardInfo.EndOfFile.QuadPart;
5575 if (nfs41_fcb->StandardInfo.DeletePending)
5576 DeletePending =
TRUE;
5577 RtlCopyMemory(&nfs41_fcb->StandardInfo, RxContext->Info.Buffer,
5578 sizeof(nfs41_fcb->StandardInfo));
5579 nfs41_fcb->StandardInfo.DeletePending = DeletePending;
5580#ifdef DEBUG_FILE_QUERY
5590#ifdef ENABLE_TIMINGS
5594#ifdef ENABLE_INDV_TIMINGS
5595 DbgP(
"nfs41_QueryFileInformation delta = %d op=%d sum=%d\n",
5599#ifdef DEBUG_FILE_QUERY
5622 print_error(
"failed to map windows error %d to NTSTATUS; "
5623 "defaulting to STATUS_INVALID_PARAMETER\n",
error);
5636 if (pVNetRootContext->read_only) {
5637 print_error(
"check_nfs41_setattr_args: Read-only mount\n");
5649 if (!(RxContext->pRelevantSrvOpen->DesiredAccess &
FILE_WRITE_DATA)) {
5657 switch (InfoClass) {
5664#ifdef DEBUG_FILE_SET
5665 DbgP(
"Attempting to rename to '%wZ'\n", &
dst);
5671 if (rinfo->RootDirectory) {
5683#ifdef DEBUG_FILE_SET
5684 DbgP(
"Attempting to add link as '%wZ'\n", &
dst);
5690 if (linfo->RootDirectory) {
5701 if (dinfo->
DeleteFile && nfs41_fcb->DeletePending) {
5712 print_error(
"nfs41_SetFileInformation: unhandled class %d\n", InfoClass);
5738#ifdef ENABLE_TIMINGS
5743#ifdef DEBUG_FILE_SET
5751 switch (InfoClass) {
5757 nfs41_fcb->DeletePending =
TRUE;
5759 if (nfs41_fcb->StandardInfo.Directory)
5761 nfs41_fcb->StandardInfo.DeletePending =
TRUE;
5762 if (RxContext->pFcb->OpenCount > 1) {
5768 nfs41_fcb->Renamed =
TRUE;
5775 if (nfs41_fcb->DeletePending) {
5776 nfs41_fcb->DeletePending = 0;
5777 nfs41_fcb->StandardInfo.DeletePending = 0;
5787 nfs41_fcb->StandardInfo.AllocationSize =
5788 nfs41_fcb->StandardInfo.EndOfFile =
info->EndOfFile;
5799 SrvOpen->pAlreadyPrefixedName,
FALSE) == 0) {
5807 pVNetRootContext->session, nfs41_fobx->nfs41_open_state,
5808 pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
5811 entry->u.SetFile.InfoClass = InfoClass;
5817 entry->buf = &rinfo;
5818 entry->buf_len =
sizeof(rinfo);
5820 entry->buf = RxContext->Info.Buffer;
5821 entry->buf_len = RxContext->Info.Length;
5823#ifdef ENABLE_TIMINGS
5833 if (!nfs41_fobx->deleg_type &&
entry->ChangeTime &&
5834 (SrvOpen->DesiredAccess &
5837 nfs41_fcb->changeattr =
entry->ChangeTime;
5841#ifdef ENABLE_TIMINGS
5845#ifdef ENABLE_INDV_TIMINGS
5846 DbgP(
"nfs41_SetFileInformation delta = %d op=%d sum=%d\n",
5847 t2.QuadPart - t1.QuadPart, setattr.tops, setattr.ticks);
5850#ifdef DEBUG_FILE_SET
5891 if (pSrvOpen->BufferingFlags &
5893 pSrvOpen->BufferingFlags &=
5896 if (pSrvOpen->BufferingFlags &
5898 pSrvOpen->BufferingFlags &=
5904 pSrvOpen->BufferingFlags |=
5908 pSrvOpen->BufferingFlags |=
5912 pSrvOpen->BufferingFlags =
5916#ifdef DEBUG_TIME_BASED_COHERENCY
5917 DbgP(
"nfs41_ComputeNewBufferingState: %wZ pSrvOpen %p Old %08x New %08x\n",
5918 pSrvOpen->pAlreadyPrefixedName, pSrvOpen, oldFlags,
5919 pSrvOpen->BufferingFlags);
5920 *pNewBufferingState = pSrvOpen->BufferingFlags;
5931 DbgP(
"Bytecount 0x%x Byteoffset 0x%x Buffer %p\n",
5958#if defined(DEBUG_TIME_BASED_COHERENCY) || \
5959 defined(DEBUG_WRITE) || defined(DEBUG_READ)
5973 if (
cur->fcb == SrvOpen->
pFcb) {
5974#ifdef DEBUG_TIME_BASED_COHERENCY
5975 DbgP(
"enable_caching: Looked&Found match for fcb=%p %wZ\n",
5983#ifdef DEBUG_TIME_BASED_COHERENCY
5984 DbgP(
"enable_caching: reached EOL looking for fcb=%p %wZ\n",
5993#ifdef DEBUG_TIME_BASED_COHERENCY
5994 DbgP(
"enable_caching: delegation recalled: srv_open=%p\n", SrvOpen);
5998 if (oentry ==
NULL)
return;
6022 print_error(
"failed to map windows error %d to NTSTATUS; "
6023 "defaulting to STATUS_NET_WRITE_FAULT\n",
status);
6031 if (!RxContext->LowIoContext.ParamsFor.ReadWrite.Buffer)
6055#ifdef ENABLE_TIMINGS
6068 pVNetRootContext->session, nfs41_fobx->nfs41_open_state,
6069 pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
6075 if (
FlagOn(RxContext->CurrentIrpSp->FileObject->Flags,
6077 entry->u.ReadWrite.rxcontext = RxContext;
6084 io_delay = pVNetRootContext->timeout + 2 *
entry->buf_len / 104857600;
6090 DbgP(
"This is asynchronous read, returning control back to the user\n");
6097#ifdef ENABLE_TIMINGS
6102 RxContext->IoStatusBlock.Information =
entry->buf_len;
6107 !pVNetRootContext->nocache && !nfs41_fobx->nocache &&
6108 !(SrvOpen->BufferingFlags &
6112 pVNetRootContext->session);
6116 RxContext->CurrentIrp->IoStatus.Status =
status;
6117 RxContext->IoStatusBlock.Information = 0;
6121#ifdef ENABLE_TIMINGS
6125#ifdef ENABLE_INDV_TIMINGS
6143 if (!RxContext->LowIoContext.ParamsFor.ReadWrite.Buffer) {
6148 if (pVNetRootContext->read_only) {
6149 print_error(
"check_nfs41_write_args: Read-only mount\n");
6176#ifdef ENABLE_TIMINGS
6190 pVNetRootContext->session, nfs41_fobx->nfs41_open_state,
6191 pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
6198 if (
FlagOn(RxContext->CurrentIrpSp->FileObject->Flags,
6200 entry->u.ReadWrite.rxcontext = RxContext;
6207 io_delay = pVNetRootContext->timeout + 2 *
entry->buf_len / 104857600;
6213 DbgP(
"This is asynchronous write, returning control back to the user\n");
6221#ifdef ENABLE_TIMINGS
6225 nfs41_fcb->StandardInfo.EndOfFile.QuadPart =
entry->buf_len +
6226 entry->u.ReadWrite.offset;
6228 RxContext->IoStatusBlock.Information =
entry->buf_len;
6229 nfs41_fcb->changeattr =
entry->ChangeTime;
6235 !pVNetRootContext->write_thru &&
6236 !pVNetRootContext->nocache &&
6237 !nfs41_fobx->write_thru && !nfs41_fobx->nocache &&
6238 !(SrvOpen->BufferingFlags &
6242 pVNetRootContext->session);
6243 }
else if (!nfs41_fobx->deleg_type)
6248 RxContext->CurrentIrp->IoStatus.Status =
status;
6249 RxContext->IoStatusBlock.Information = 0;
6253#ifdef ENABLE_TIMINGS
6257#ifdef ENABLE_INDV_TIMINGS
6281 DbgP(
"offset 0x%llx, length 0x%llx, exclusive=%u, blocking=%u\n",
6288 if (
Length->QuadPart == 0)
6313 print_error(
"failed to map windows error %d to NTSTATUS; "
6314 "defaulting to STATUS_INVALID_NETWORK_RESPONSE\n",
status);
6325 DbgP(
"offset 0x%llx, length 0x%llx, exclusive=%u, blocking=%u\n",
6334#define MSEC_TO_RELATIVE_WAIT (-10000)
6335#define MIN_LOCK_POLL_WAIT (500 * MSEC_TO_RELATIVE_WAIT)
6336#define MAX_LOCK_POLL_WAIT (30000 * MSEC_TO_RELATIVE_WAIT)
6341 if (delay->QuadPart == 0)
6344 delay->QuadPart <<= 1;
6372#ifdef ENABLE_TIMINGS
6390 pVNetRootContext->session, nfs41_fobx->nfs41_open_state,
6391 pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
6406 DbgP(
"returned ERROR_LOCK_FAILED; retrying in %llums\n",
6414 RxContext->CurrentIrp->IoStatus.Status =
status;
6418#ifdef ENABLE_TIMINGS
6422#ifdef ENABLE_INDV_TIMINGS
6440 DbgP(
"LOWIO_OP_UNLOCK_MULTIPLE:");
6442 DbgP(
" (offset=%llu, length=%llu)",
lock->ByteOffset,
lock->Length);
6447 DbgP(
"LOWIO_OP_UNLOCK: offset=%llu, length=%llu\n",
6480#ifdef ENABLE_TIMINGS
6493 pVNetRootContext->session, nfs41_fobx->nfs41_open_state,
6494 pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
6504 entry->u.Unlock.count = 1;
6505 entry->u.Unlock.locks.ByteOffset =
6507 entry->u.Unlock.locks.Length =
6515 RxContext->CurrentIrp->IoStatus.Status =
status;
6518#ifdef ENABLE_TIMINGS
6522#ifdef ENABLE_INDV_TIMINGS
6524 unlock.tops, unlock.ticks);
6547 print_error(
"failed to map windows error %d to NTSTATUS; "
6548 "defaulting to STATUS_INVALID_NETWORK_RESPONSE\n",
status);
6560 DbgP(
"SubstituteNameOffset: %8u\n",
6562 DbgP(
"SubstituteNameLength: %8u\n",
6564 DbgP(
"PrintNameOffset: %8u\n",
6566 DbgP(
"PrintNameLength: %8u\n",
6568 DbgP(
"Flags: %08X\n",
6575 DbgP(
"SubstituteName: %wZ\n", &
name);
6596 if (VNetRootContext->read_only) {
6611 if (FsCtl->pOutputBuffer !=
NULL) {
6622 if (FsCtl->InputBufferLength < HeaderLen ||
6627 if (FsCtl->InputBufferLength != HeaderLen + Reparse->ReparseDataLength) {
6669 Reparse->SymbolicLinkReparseBuffer.PrintNameLength;
6670 TargetName.Buffer = &Reparse->SymbolicLinkReparseBuffer.PathBuffer[
6671 Reparse->SymbolicLinkReparseBuffer.PrintNameOffset/
sizeof(
WCHAR)];
6674 VNetRootContext->session, Fobx->nfs41_open_state,
6675 pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
6720 DbgP(
"FILE_ATTRIBUTE_REPARSE_POINT is not set!\n");
6760 VNetRootContext->session, Fobx->nfs41_open_state,
6761 pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &
entry);
6788 RxContext->IoStatusBlock.Information = HeaderLen +
TargetName.Length;
6790 RxContext->InformationToReturn = HeaderLen +
TargetName.Length;
6812 switch (RxContext->LowIoContext.ParamsFor.FsCtl.FsControlCode) {
6822 DbgP(
"FsControlCode: %d\n",
6823 RxContext->LowIoContext.ParamsFor.FsCtl.FsControlCode);
6852#ifdef DEBUG_FSDDISPATCH
6857#ifdef DEBUG_FSDDISPATCH
6868 Irp->IoStatus.Information = 0;
6878#ifdef DEBUG_FSDDISPATCH
6879 DbgP(
"IoStatus status = 0x%x info = 0x%x\n",
Irp->IoStatus.Status,
6880 Irp->IoStatus.Information);
7000 nfs41_ops.MRxCompleteBufferingStateChangeRequest =
7041#ifdef DEBUG_TIME_BASED_COHERENCY
7042 DbgP(
"fcbopen_main: Checking attributes for fcb=%p "
7043 "change_time=%llu skipping=%d\n",
cur->fcb,
7044 cur->ChangeTime,
cur->skip);
7051 &
cur->nfs41_fobx->sec_ctx,
cur->session,
7052 cur->nfs41_fobx->nfs41_open_state,
7057 entry->buf = &binfo;
7058 entry->buf_len =
sizeof(binfo);
7063 if (
cur->ChangeTime !=
entry->ChangeTime) {
7067#ifdef DEBUG_TIME_BASED_COHERENCY
7068 DbgP(
"fcbopen_main: old ctime=%llu new_ctime=%llu\n",
7069 cur->ChangeTime,
entry->ChangeTime);
7071 cur->ChangeTime =
entry->ChangeTime;
7073 psrvEntry = &
cur->fcb->SrvOpenList;
7074 psrvEntry = psrvEntry->
Flink;
7080#ifdef DEBUG_TIME_BASED_COHERENCY
7081 DbgP(
"fcbopen_main: ************ Invalidate the cache %wZ"
7085 cur->fcb->pNetRoot->pSrvCall, srv_open,
7088 if (psrvEntry->
Flink == &
cur->fcb->SrvOpenList) {
7089#ifdef DEBUG_TIME_BASED_COHERENCY
7090 DbgP(
"fcbopen_main: reached end of srvopen for fcb %p\n",
7095 psrvEntry = psrvEntry->
Flink;
7103#ifdef DEBUG_TIME_BASED_COHERENCY
7104 DbgP(
"fcbopen_main: reached end of the fcb list\n");
7127 TIME_FIELDS jan_1_1970 = {1970, 1, 1, 0, 0, 0, 0, 0};
7144 print_error(
"nfs41_init_ops failed to initialize dispatch table\n");
7148 DbgP(
"calling RxRegisterMinirdr\n");
7169 DbgP(
"calling IoCreateSymbolicLink %wZ %wZ\n", &user_dev_name, &
dev_name);
7173 goto out_unregister;
7189 goto out_unregister;
7219 if (RxContext ==
NULL) {
7230 print_error(
"couldn't delete device symbolic link\n");
7235 print_error(
"couldn't delete pipe symbolic link\n");
7239 DbgP(
"driver unloaded %p\n", drv);
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define OBJ_NAME_PATH_SEPARATOR
#define InterlockedIncrement
#define FILE_DIRECTORY_FILE
#define FILE_DELETE_ON_CLOSE
#define InterlockedIncrement64(a)
_Inout_ PVCB _In_ BOOLEAN Force
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define STATUS_NOT_SUPPORTED
#define STATUS_NOT_IMPLEMENTED
const char * opcode2string(DWORD opcode)
void print_hexbuf(int level, unsigned char *title, unsigned char *buf, int len)
#define ERROR_INSUFFICIENT_BUFFER
#define NT_SUCCESS(StatCode)
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define ERROR_NOT_SUPPORTED
#define FILE_ATTRIBUTE_NORMAL
#define ERROR_ACCESS_DENIED
#define ERROR_INVALID_NAME
static const WCHAR version[]
_In_ PIO_STACK_LOCATION IrpSp
#define InterlockedExchangePointer(Target, Value)
BOOLEAN RtlTimeFieldsToTime(IN PTIME_FIELDS TimeFields, IN PLARGE_INTEGER Time)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
UNICODE_STRING * PUNICODE_STRING
#define IsListEmpty(ListHead)
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define RtlCompareMemory(s1, s2, l)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeSetEvent(pEvt, foo, foo2)
#define KeQuerySystemTime(t)
#define InitializeListHead(ListHead)
#define KeDelayExecutionThread(mode, foo, t)
#define BooleanFlagOn(F, SF)
IN PVCB IN PDIRENT OUT PULONG EaLength
IN PDCB IN PCCB IN VBO IN OUT PULONG OUT PDIRENT OUT PBCB OUT PVBO ByteOffset
#define FCB_STATE_PAGING_FILE
#define FCB_STATE_WRITECACHING_ENABLED
#define FCB_STATE_WRITEBUFFERING_ENABLED
#define FCB_STATE_DISABLE_LOCAL_BUFFERING
#define FCB_STATE_READCACHING_ENABLED
struct _V_NET_ROOT * PV_NET_ROOT
PMRX_FOBX NTAPI RxCreateNetFobx(_Out_ PRX_CONTEXT RxContext, _In_ PMRX_SRV_OPEN MrxSrvOpen)
#define GET_ALREADY_PREFIXED_NAME_FROM_CONTEXT(Rxcontext)
#define RxFormInitPacket(IP, I1, I1a, I2, I3, I4a, I4b, I5, I6, I7)
#define FCB_STATE_READBUFFERING_ENABLED
VOID NTAPI RxFinishFcbInitialization(_In_ OUT PMRX_FCB Fcb, _In_ RX_FILE_TYPE FileType, _In_opt_ PFCB_INIT_PACKET InitPacket)
struct _FileName FileName
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
struct _FILE_FULL_EA_INFORMATION * PFILE_FULL_EA_INFORMATION
@ FileEndOfFileInformation
@ FileInternalInformation
@ FileAttributeTagInformation
@ FileDirectoryInformation
@ FileIdBothDirectoryInformation
@ FileAllocationInformation
@ FileFullDirectoryInformation
@ FileNetworkOpenInformation
@ FileDispositionInformation
@ FileBothDirectoryInformation
@ FileIdFullDirectoryInformation
enum _FILE_INFORMATION_CLASS FILE_INFORMATION_CLASS
#define FILE_OVERWRITE_IF
#define FILE_OPEN_REPARSE_POINT
#define FILE_SUPPORTS_EXTENDED_ATTRIBUTES
struct _FILE_LINK_INFORMATION * PFILE_LINK_INFORMATION
#define FILE_SYNCHRONOUS_IO_NONALERT
@ FileFsDeviceInformation
@ FileFsAttributeInformation
@ FileFsVolumeInformation
struct _FILE_GET_EA_INFORMATION * PFILE_GET_EA_INFORMATION
#define FILE_NO_INTERMEDIATE_BUFFERING
#define FILE_WRITE_THROUGH
struct _FILE_FS_ATTRIBUTE_INFORMATION * PFILE_FS_ATTRIBUTE_INFORMATION
enum _FSINFOCLASS FS_INFORMATION_CLASS
struct _FILE_FULL_EA_INFORMATION FILE_FULL_EA_INFORMATION
#define FILE_CREATE_TREE_CONNECTION
VOID pFxInterrupt ForceDisconnect()
GLuint GLuint GLsizei count
GLboolean GLboolean GLboolean b
GLenum const GLfloat * params
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLboolean GLboolean GLboolean GLboolean a
GLubyte GLubyte GLubyte GLubyte w
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
LARGE_INTEGER NTAPI KeQueryPerformanceCounter(IN PLARGE_INTEGER PerformanceFreq)
struct dirent *__cdecl readdir(DIR *)
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
NTSYSAPI ULONG WINAPI RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR)
struct _FILE_RENAME_INFORMATION * PFILE_RENAME_INFORMATION
struct _FILE_EA_INFORMATION * PFILE_EA_INFORMATION
NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR, BOOLEAN, PACL, BOOLEAN)
NTSYSAPI void WINAPI RtlCopyLuid(PLUID, const LUID *)
#define EXCEPTION_EXECUTE_HANDLER
#define InterlockedCompareExchangePointer
#define InterlockedCompareExchange
#define REPARSE_DATA_BUFFER_HEADER_SIZE
NTSTATUS NTAPI RtlUnicodeToUTF8N(CHAR *utf8_dest, ULONG utf8_bytes_max, ULONG *utf8_bytes_written, const WCHAR *uni_src, ULONG uni_bytes)
NTSTATUS NTAPI RxLowIoCompletion(_In_ PRX_CONTEXT RxContext)
_SECURITY_IMPERSONATION_LEVEL
struct _SECURITY_QUALITY_OF_SERVICE SECURITY_QUALITY_OF_SERVICE
VOID NTAPI MmProbeAndLockPages(IN PMDL Mdl, IN KPROCESSOR_MODE AccessMode, IN LOCK_OPERATION Operation)
VOID NTAPI MmUnlockPages(IN PMDL Mdl)
PVOID NTAPI MmMapLockedPagesSpecifyCache(IN PMDL Mdl, IN KPROCESSOR_MODE AccessMode, IN MEMORY_CACHING_TYPE CacheType, IN PVOID BaseAddress, IN ULONG BugCheckOnFailure, IN ULONG Priority)
VOID NTAPI MmUnmapLockedPages(IN PVOID BaseAddress, IN PMDL Mdl)
BOOLEAN NTAPI MmIsAddressValid(IN PVOID VirtualAddress)
#define FILE_STANDARD_INFORMATION
#define FILE_BASIC_INFORMATION
#define ERROR_FILE_NOT_FOUND
#define SeDeleteClientSecurity(C)
static OUT PIO_STATUS_BLOCK IoStatusBlock
static PIO_STATUS_BLOCK void ULONG FS_INFORMATION_CLASS info_class
#define InitializeObjectAttributes(p, n, a, r, s)
const char * dev_name(int device)
NTSTATUS NTAPI RxStartMinirdr(_In_ PRX_CONTEXT RxContext, _Out_ PBOOLEAN PostToFsp)
#define RDBSS_MANAGE_FOBX_EXTENSION
@ LOWIO_OP_UNLOCK_MULTIPLE
#define RX_REGISTERMINI_FLAG_DONT_PROVIDE_MAILSLOTS
#define RDBSS_MANAGE_FCB_EXTENSION
NTSTATUS NTAPI RxFsdDispatch(_In_ PRDBSS_DEVICE_OBJECT RxDeviceObject, _In_ PIRP Irp)
NTSTATUS NTAPI RxRegisterMinirdr(_Out_ PRDBSS_DEVICE_OBJECT *DeviceObject, _Inout_ PDRIVER_OBJECT DriverObject, _In_ PMINIRDR_DISPATCH MrdrDispatch, _In_ ULONG Controls, _In_ PUNICODE_STRING DeviceName, _In_ ULONG DeviceExtensionSize, _In_ DEVICE_TYPE DeviceType, _In_ ULONG DeviceCharacteristics)
#define RDBSS_MANAGE_V_NET_ROOT_EXTENSION
#define LOWIO_READWRITEFLAG_PAGING_IO
#define RDBSS_MANAGE_NET_ROOT_EXTENSION
NTSTATUS NTAPI RxStopMinirdr(_In_ PRX_CONTEXT RxContext, _Out_ PBOOLEAN PostToFsp)
struct _MRX_SRVCALLDOWN_STRUCTURE * PMRX_SRVCALLDOWN_STRUCTURE
#define MRX_NET_ROOT_STATE_GOOD
struct _MRX_SRV_OPEN_ * PMRX_SRV_OPEN
NTSTATUS NTAPI RxAcquireExclusiveFcbResourceInMRx(_Inout_ PMRX_FCB Fcb)
struct _MRX_V_NET_ROOT_ * PMRX_V_NET_ROOT
DWORD SECURITY_INFORMATION
struct _SECURITY_DESCRIPTOR * PSECURITY_DESCRIPTOR
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
NTSYSAPI NTSTATUS NTAPI RtlCreateSecurityDescriptor(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Revision)
NTSYSAPI NTSTATUS NTAPI RtlGetDaclSecurityDescriptor(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PBOOLEAN DaclPresent, _Out_ PACL *Dacl, _Out_ PBOOLEAN DaclDefaulted)
void print_fo_all(int on, PRX_CONTEXT c)
unsigned char * print_file_information_class(int InfoClass)
VOID print_srv_call(int on, IN PMRX_SRV_CALL p)
void print_ioctl(int on, int op)
void print_driver_state(int state)
void print_get_ea(int on, PFILE_GET_EA_INFORMATION info)
void print_irps_flags(int on, PIO_STACK_LOCATION irps)
VOID print_net_root(int on, IN PMRX_NET_ROOT p)
VOID print_irp_flags(int on, PIRP irp)
VOID print_v_net_root(int on, IN PMRX_V_NET_ROOT p)
void print_fs_ioctl(int on, int op)
void print_open_error(int on, int status)
void print_acl_args(SECURITY_INFORMATION info)
ULONG __cdecl print_error(IN PCCH fmt,...)
void print_nt_create_params(int on, NT_CREATE_PARAMETERS params)
void print_file_object(int on, PFILE_OBJECT file)
void print_std_info(int on, PFILE_STANDARD_INFORMATION info)
unsigned char * print_fs_information_class(int InfoClass)
void print_ea_info(int on, PFILE_FULL_EA_INFORMATION info)
void print_basic_info(int on, PFILE_BASIC_INFORMATION info)
void print_wait_status(int on, const char *prefix, NTSTATUS status, const char *opcode, PVOID entry, LONGLONG xid)
void print_caching_level(int on, ULONG flag, PUNICODE_STRING name)
NTSTATUS marshal_nfs41_easet(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
NTSTATUS map_querydir_errors(DWORD status)
NTSTATUS marshal_nfs41_fileset(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
NTSTATUS nfs41_FinalizeSrvCall(PMRX_SRV_CALL pSrvCall, BOOLEAN Force)
VOID nfs41_ExtractNetRootName(IN PUNICODE_STRING FilePathName, IN PMRX_SRV_CALL SrvCall, OUT PUNICODE_STRING NetRootName, OUT PUNICODE_STRING RestOfName OPTIONAL)
NTSTATUS nfs41_DevFcbXXXControlFile(IN OUT PRX_CONTEXT RxContext)
PRDBSS_DEVICE_OBJECT nfs41_dev
NTSTATUS nfs41_CollapseOpen(IN OUT PRX_CONTEXT RxContext)
DRIVER_UNLOAD nfs41_driver_unload
NTSTATUS marshal_nfs41_eaget(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
NTSTATUS nfs41_ShouldTryToCollapseThisOpen(IN OUT PRX_CONTEXT RxContext)
#define MIN_LOCK_POLL_WAIT
#define nfs41_RemoveFirst(lock, list, pEntry)
NTSTATUS nfs41_SetEaInformation(IN OUT PRX_CONTEXT RxContext)
NTSTATUS nfs41_FinalizeNetRoot(IN OUT PMRX_NET_ROOT pNetRoot, IN PBOOLEAN ForceDisconnect)
struct _nfs3_attrs nfs3_attrs
#define ENABLE_READ_CACHING
const char * secflavorop2name(DWORD sec_flavor)
#define NFS41_MM_POOLTAG_UP
NTSTATUS map_readwrite_errors(DWORD status)
NTSTATUS nfs41_ComputeNewBufferingState(IN OUT PMRX_SRV_OPEN pSrvOpen, IN PVOID pMRxContext, OUT ULONG *pNewBufferingState)
void print_querydir_args(PRX_CONTEXT RxContext)
DWORD map_disposition_to_create_retval(DWORD disposition, DWORD errno)
struct _NFS41_MOUNT_CONFIG NFS41_MOUNT_CONFIG
NTSTATUS nfs41_QueryFileInformation(IN OUT PRX_CONTEXT RxContext)
NTSTATUS map_close_errors(DWORD status)
NTSTATUS SharedMemoryInit(OUT PHANDLE phSection)
NTSTATUS nfs41_GetConnectionInfoFromBuffer(IN PVOID Buffer, IN ULONG BufferLen, OUT PUNICODE_STRING pConnectionName, OUT PVOID *ppEaBuffer, OUT PULONG pEaLength)
NTSTATUS unmarshal_nfs41_getacl(nfs41_updowncall_entry *cur, unsigned char **buf)
NTSTATUS nfs41_GetLUID(PLUID id)
NTSTATUS check_nfs41_getreparse_args(PRX_CONTEXT RxContext)
NTSTATUS check_nfs41_dirquery_args(IN PRX_CONTEXT RxContext)
#define ENABLE_READWRITE_CACHING
#define NFS41_MM_POOLTAG_OPEN
void file_time_to_nfs_time(IN const PLARGE_INTEGER file_time, OUT LONGLONG *nfs_time)
struct _NFS41_FCB NFS41_FCB
#define NFS41GetVNetRootExtension(pVNetRoot)
NTSTATUS marshal_nfs41_getacl(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
#define MAX_SEC_FLAVOR_LEN
struct _NFS41_SERVER_ENTRY * PNFS41_SERVER_ENTRY
struct _NFS41_MOUNT_CONFIG * PNFS41_MOUNT_CONFIG
struct _NFS41_SERVER_ENTRY NFS41_SERVER_ENTRY
__inline ULONG unlock_list_count(PLOWIO_LOCK_LIST lock)
NTSTATUS nfs41_shutdown_daemon(DWORD version)
NTSTATUS nfs41_UpcallWaitForReply(IN nfs41_updowncall_entry *entry, IN DWORD secs)
enum _NULMRX_STORAGE_TYPE_CODES NFS41_STORAGE_TYPE_CODES
struct _NFS41_DEVICE_EXTENSION * PNFS41_DEVICE_EXTENSION
NTSTATUS unmarshal_nfs41_rw(nfs41_updowncall_entry *cur, unsigned char **buf)
nfs41_init_driver_state nfs41_init_state
#define nfs41_IsListEmpty(lock, list, flag)
NTSTATUS nfs41_QueryEaInformation(IN OUT PRX_CONTEXT RxContext)
static BOOLEAN is_root_directory(PRX_CONTEXT RxContext)
NTSTATUS marshal_nfs41_open(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
NTSTATUS map_lock_errors(DWORD status)
NTSTATUS nfs41_init_ops()
void unmarshal_nfs41_symlink(nfs41_updowncall_entry *cur, unsigned char **buf)
DRIVER_INITIALIZE DriverEntry
#define UPCALL_TIMEOUT_DEFAULT
INLINE ULONG length_as_utf8(PCUNICODE_STRING str)
struct _updowncall_list nfs41_updowncall_list
NTSTATUS nfs41_get_sec_ctx(IN enum _SECURITY_IMPERSONATION_LEVEL level, OUT PSECURITY_CLIENT_CONTEXT out_ctx)
NTSTATUS marshal_nfs41_mount(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
struct _NFS41_V_NET_ROOT_EXTENSION NFS41_V_NET_ROOT_EXTENSION
NTSTATUS nfs41_CloseSrvOpen(IN OUT PRX_CONTEXT RxContext)
NTSTATUS nfs41_SetFileInformation(IN OUT PRX_CONTEXT RxContext)
NTSTATUS nfs41_CompleteBufferingStateChangeRequest(IN OUT PRX_CONTEXT RxContext, IN OUT PMRX_SRV_OPEN SrvOpen, IN PVOID pContext)
NTSTATUS nfs41_Write(IN OUT PRX_CONTEXT RxContext)
void nfs41_create_volume_info(PFILE_FS_VOLUME_INFORMATION pVolInfo, DWORD *len)
NTSTATUS check_nfs41_setattr_args(IN PRX_CONTEXT RxContext)
void enable_caching(PMRX_SRV_OPEN SrvOpen, PNFS41_FOBX nfs41_fobx, ULONGLONG ChangeTime, HANDLE session)
#define MSEC_TO_RELATIVE_WAIT
void print_debug_header(PRX_CONTEXT RxContext)
NTSTATUS check_nfs41_write_args(IN PRX_CONTEXT RxContext)
NTSTATUS SharedMemoryFree(IN HANDLE hSection)
struct _NFS41_FOBX NFS41_FOBX
nfs41_updowncall_list upcall
NTSTATUS marshal_nfs41_dirquery(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
NTSTATUS nfs41_unmount(HANDLE session, DWORD version, DWORD timeout)
NTSTATUS map_volume_errors(DWORD status)
@ NFS41_WAITING_FOR_DOWNCALL
@ NFS41_WAITING_FOR_UPCALL
NTSTATUS marshall_unicode_as_utf8(IN OUT unsigned char **pos, IN PCUNICODE_STRING str)
NTSTATUS unmarshal_nfs41_dirquery(nfs41_updowncall_entry *cur, unsigned char **buf)
#define NFS41_MM_POOLTAG_MOUNT
#define nfs41_RemoveEntry(lock, pEntry)
#define MOUNT_CONFIG_RW_SIZE_DEFAULT
NTSTATUS nfs41_mount(PNFS41_MOUNT_CONFIG config, DWORD sec_flavor, PHANDLE session, DWORD *version, PFILE_FS_ATTRIBUTE_INFORMATION FsAttrs)
NTSTATUS nfs41_FsCtl(IN OUT PRX_CONTEXT RxContext)
NTSTATUS nfs41_FinalizeVNetRoot(IN OUT PMRX_V_NET_ROOT pVNetRoot, IN PBOOLEAN ForceDisconnect)
NTSTATUS nfs41_CreateSrvCall(PMRX_SRV_CALL pSrvCall, PMRX_SRVCALL_CALLBACK_CONTEXT pCallbackContext)
void print_readwrite_args(PRX_CONTEXT RxContext)
void print_nfs3_attrs(nfs3_attrs *attrs)
void unmarshal_nfs41_mount(nfs41_updowncall_entry *cur, unsigned char **buf)
void nfs41_invalidate_cache(IN PRX_CONTEXT RxContext)
NTSTATUS nfs41_Lock(IN OUT PRX_CONTEXT RxContext)
#define ENABLE_WRITE_CACHING
NTSTATUS marshal_nfs41_setacl(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
struct _nfs41_fcb_list nfs41_fcb_list
#define RxDefineNode(node, type)
void unmarshal_nfs41_attrget(nfs41_updowncall_entry *cur, PVOID attr_value, ULONG *attr_len, unsigned char **buf)
NTSTATUS marshal_nfs41_header(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
NTSTATUS map_query_acl_error(DWORD error)
#define NFS41GetFobxExtension(pFobx)
NTSTATUS _nfs41_CreateSrvCall(PMRX_SRVCALL_CALLBACK_CONTEXT pCallbackContext)
NTSTATUS nfs41_AreFilesAliased(PFCB a, PFCB b)
NTSTATUS marshal_nfs41_filequery(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
ULONG nfs41_ExtendForCache(IN OUT PRX_CONTEXT RxContext, IN PLARGE_INTEGER pNewFileSize, OUT PLARGE_INTEGER pNewAllocationSize)
struct _NFS41_V_NET_ROOT_EXTENSION * PNFS41_V_NET_ROOT_EXTENSION
NTSTATUS nfs41_Flush(IN OUT PRX_CONTEXT RxContext)
NTSTATUS nfs41_SetFileInformationAtCleanup(IN OUT PRX_CONTEXT RxContext)
#define NFS41_MM_POOLTAG_ACL
#define nfs41_GetFirstMountEntry(lock, list, pEntry)
NTSTATUS check_nfs41_read_args(IN PRX_CONTEXT RxContext)
BOOLEAN isDataAccess(ACCESS_MASK mask)
NTSTATUS check_nfs41_setreparse_args(IN PRX_CONTEXT RxContext)
NTSTATUS nfs41_MountConfig_ParseOptions(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, IN OUT PNFS41_MOUNT_CONFIG Config)
NTSTATUS marshal_nfs41_lock(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
INLINE BOOL AnsiStrEq(IN const ANSI_STRING *lhs, IN const CHAR *rhs, IN const UCHAR rhs_len)
NTSTATUS check_nfs41_create_args(IN PRX_CONTEXT RxContext)
void create_nfs3_attrs(nfs3_attrs *attrs, PNFS41_FCB nfs41_fcb)
static NTSTATUS QueryCygwinSymlink(IN OUT PRX_CONTEXT RxContext, IN PFILE_GET_EA_INFORMATION query, OUT PFILE_FULL_EA_INFORMATION info)
NTSTATUS check_nfs41_setea_args(IN PRX_CONTEXT RxContext)
struct _nfs41_fcb_list_entry nfs41_fcb_list_entry
NTSTATUS nfs41_SetSecurityInformation(IN OUT PRX_CONTEXT RxContext)
NTSTATUS nfs41_DeallocateForFcb(IN OUT PMRX_FCB pFcb)
NTSTATUS marshal_nfs41_unmount(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
#define MOUNT_CONFIG_RW_SIZE_MIN
NTSTATUS nfs41_QueryVolumeInformation(IN OUT PRX_CONTEXT RxContext)
NTSTATUS nfs41_UpcallCreate(IN DWORD opcode, IN PSECURITY_CLIENT_CONTEXT clnt_sec_ctx, IN HANDLE session, IN HANDLE open_state, IN DWORD version, IN PUNICODE_STRING filename, OUT nfs41_updowncall_entry **entry_out)
VOID nfs41_update_fcb_list(PMRX_FCB fcb, ULONGLONG ChangeTime)
#define NFS41GetNetRootExtension(pNetRoot)
BOOLEAN areOpenParamsValid(NT_CREATE_PARAMETERS *params)
BOOLEAN isFilenameTooLong(PUNICODE_STRING name, PNFS41_V_NET_ROOT_EXTENSION pVNetRootContext)
struct _NFS41_NETROOT_EXTENSION NFS41_NETROOT_EXTENSION
enum _nfs41_updowncall_state nfs41_updowncall_state
#define DECLARE_CONST_ANSI_STRING(_var, _string)
BOOLEAN isOpen2Create(ULONG disposition)
NTSTATUS map_setea_error(DWORD error)
void unmarshal_nfs41_eaget(nfs41_updowncall_entry *cur, unsigned char **buf)
NTSTATUS marshal_nfs41_close(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
NTSTATUS check_nfs41_queryea_args(IN PRX_CONTEXT RxContext)
nfs41_updowncall_list downcall
NTSTATUS marshal_nfs41_symlink(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
DRIVER_DISPATCH(nfs41_FsdDispatch)
void denied_lock_backoff(IN OUT PLARGE_INTEGER delay)
void print_queryvolume_args(PRX_CONTEXT RxContext)
NTSTATUS nfs41_IsValidDirectory(IN OUT PRX_CONTEXT RxContext, IN PUNICODE_STRING DirectoryName)
struct _NFS41_FOBX * PNFS41_FOBX
NTSTATUS nfs41_FsdDispatch(IN PDEVICE_OBJECT dev, IN PIRP Irp)
NTSTATUS handle_upcall(IN PRX_CONTEXT RxContext, IN nfs41_updowncall_entry *entry, OUT ULONG *len)
NTSTATUS nfs41_DeleteConnection(IN PRX_CONTEXT RxContext, OUT PBOOLEAN PostToFsp)
NTSTATUS nfs41_QueryDirectory(IN OUT PRX_CONTEXT RxContext)
NTSTATUS map_symlink_errors(NTSTATUS status)
NTSTATUS nfs41_Unlock(IN OUT PRX_CONTEXT RxContext)
NTSTATUS nfs41_Unimplemented(PRX_CONTEXT RxContext)
VOID unmarshal_nfs41_setattr(nfs41_updowncall_entry *cur, PULONGLONG dest_buf, unsigned char **buf)
NTSTATUS nfs41_Start(IN OUT PRX_CONTEXT RxContext, IN OUT PRDBSS_DEVICE_OBJECT dev)
_NULMRX_STORAGE_TYPE_CODES
@ NTC_NFS41_DEVICE_EXTENSION
struct _NFS41_FCB * PNFS41_FCB
#define nfs41_GetFirstEntry(lock, list, pEntry)
NTSTATUS map_mount_errors(DWORD status)
NTSTATUS nfs41_QuerySecurityInformation(IN OUT PRX_CONTEXT RxContext)
VOID nfs41_remove_fcb_entry(PMRX_FCB fcb)
NTSTATUS unmarshal_nfs41_open(nfs41_updowncall_entry *cur, unsigned char **buf)
NTSTATUS nfs41_CreateConnection(IN PRX_CONTEXT RxContext, OUT PBOOLEAN PostToFsp)
NTSTATUS nfs41_CreateVNetRoot(IN OUT PMRX_CREATENETROOT_CONTEXT pCreateNetRootContext)
NTSTATUS marshal_nfs41_shutdown(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
struct _NFS41_DEVICE_EXTENSION NFS41_DEVICE_EXTENSION
NTSTATUS nfs41_MountConfig_ParseBoolean(IN PFILE_FULL_EA_INFORMATION Option, IN PUNICODE_STRING usValue, OUT PBOOLEAN Value)
NTSTATUS nfs41_downcall(IN PRX_CONTEXT RxContext)
void nfs41_MountConfig_InitDefaults(OUT PNFS41_MOUNT_CONFIG Config)
NTSTATUS marshal_nfs41_unlock(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
static NTSTATUS QueryCygwinEA(IN OUT PRX_CONTEXT RxContext, IN PFILE_GET_EA_INFORMATION query, OUT PFILE_FULL_EA_INFORMATION info)
NTSTATUS marshal_nfs41_volume(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
void unmarshal_nfs41_header(nfs41_updowncall_entry *tmp, unsigned char **buf)
NTSTATUS nfs41_Stop(IN OUT PRX_CONTEXT RxContext, IN OUT PRDBSS_DEVICE_OBJECT dev)
NTSTATUS nfs41_SrvCallWinnerNotify(IN OUT PMRX_SRV_CALL pSrvCall, IN BOOLEAN ThisMinirdrIsTheWinner, IN OUT PVOID pSrvCallContext)
#define SERVER_NAME_BUFFER_SIZE
struct _MINIRDR_DISPATCH nfs41_ops
struct _nfs41_mount_entry nfs41_mount_entry
NTSTATUS check_nfs41_setacl_args(PRX_CONTEXT RxContext)
NTSTATUS map_open_errors(DWORD status, USHORT len)
#define MOUNT_CONFIG_RW_SIZE_MAX
nfs41_start_driver_state nfs41_start_state
KSTART_ROUTINE fcbopen_main
NTSTATUS marshal_nfs41_rw(nfs41_updowncall_entry *entry, unsigned char *buf, ULONG buf_len, ULONG *len)
NTSTATUS GetConnectionHandle(IN PUNICODE_STRING ConnectionName, IN PVOID EaBuffer, IN ULONG EaLength, OUT PHANDLE Handle)
#define MAX_LOCK_POLL_WAIT
struct _NFS41_NETROOT_EXTENSION * PNFS41_NETROOT_EXTENSION
NTSTATUS nfs41_DeallocateForFobx(IN OUT PMRX_FOBX pFobx)
static BOOLEAN create_should_pass_ea(IN PFILE_FULL_EA_INFORMATION ea, IN ULONG disposition)
NTSTATUS nfs41_Create(IN OUT PRX_CONTEXT RxContext)
NTSTATUS nfs41_SetReparsePoint(IN OUT PRX_CONTEXT RxContext)
NTSTATUS nfs41_GetReparsePoint(IN OUT PRX_CONTEXT RxContext)
NTSTATUS nfs41_MountConfig_ParseDword(IN PFILE_FULL_EA_INFORMATION Option, IN PUNICODE_STRING usValue, OUT PDWORD Value, IN DWORD Minimum, IN DWORD Maximum)
NTSTATUS nfs41_IsLockRealizable(IN OUT PMRX_FCB pFcb, IN PLARGE_INTEGER ByteOffset, IN PLARGE_INTEGER Length, IN ULONG LowIoLockFlags)
NTSTATUS map_queryfile_error(DWORD error)
void unmarshal_nfs41_getattr(nfs41_updowncall_entry *cur, unsigned char **buf)
void print_unlock_args(PRX_CONTEXT RxContext)
struct _nfs41_mount_list nfs41_mount_list
NTSTATUS map_sec_flavor(IN PUNICODE_STRING sec_flavor_name, OUT PDWORD sec_flavor)
NTSTATUS has_nfs_prefix(IN PUNICODE_STRING SrvCallName, IN PUNICODE_STRING NetRootName)
#define NFS41GetDeviceExtension(RxContext, pExt)
void print_lock_args(PRX_CONTEXT RxContext)
LARGE_INTEGER unix_time_diff
#define NFS41GetFcbExtension(pFcb)
NTSTATUS map_setfile_error(DWORD error)
NTSTATUS nfs41_Read(IN OUT PRX_CONTEXT RxContext)
void print_debug_filedirquery_header(PRX_CONTEXT RxContext)
void print_reparse_buffer(PREPARSE_DATA_BUFFER Reparse)
NTSTATUS check_nfs41_getacl_args(PRX_CONTEXT RxContext)
#define nfs41_AddEntry(lock, list, pEntry)
BOOLEAN isStream(PUNICODE_STRING name)
#define NFS41_MM_POOLTAG_DOWN
struct _updowncall_entry nfs41_updowncall_entry
#define IOCTL_NFS41_INVALCACHE
#define IOCTL_NFS41_WRITE
#define NFS41_DEVICE_NAME
#define IOCTL_NFS41_ADDCONN
#define NFS41_SHADOW_DEVICE_NAME
#define IOCTL_NFS41_START
#define NFS41_SHARED_MEMORY_NAME
enum _nfs41_init_driver_state nfs41_init_driver_state
enum _nfs41_start_driver_state nfs41_start_driver_state
#define NFS41_SHADOW_PIPE_NAME
@ NFS41_START_DRIVER_STARTABLE
@ NFS41_START_DRIVER_START_IN_PROGRESS
@ NFS41_START_DRIVER_STARTED
@ NFS41_START_DRIVER_STOPPED
#define IOCTL_NFS41_GETSTATE
@ NFS41_INIT_DRIVER_STARTABLE
#define IOCTL_NFS41_DELCONN
struct __NFS41NP_SHARED_MEMORY NFS41NP_SHARED_MEMORY
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
#define FILE_REMOTE_DEVICE
#define SECTION_MAP_WRITE
#define FILE_ATTRIBUTE_READONLY
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToInteger(PUNICODE_STRING String, ULONG Base, PULONG Value)
struct _FILE_FS_DEVICE_INFORMATION FILE_FS_DEVICE_INFORMATION
#define FILE_SHARE_DELETE
struct _FILE_END_OF_FILE_INFORMATION * PFILE_END_OF_FILE_INFORMATION
#define FILE_WRITE_ATTRIBUTES
#define FILE_DEVICE_IS_MOUNTED
#define FILE_ATTRIBUTE_ARCHIVE
struct _FILE_DISPOSITION_INFORMATION * PFILE_DISPOSITION_INFORMATION
#define FILE_ATTRIBUTE_TEMPORARY
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define FILE_ATTRIBUTE_REPARSE_POINT
#define FileFsFullSizeInformation
#define IoCompleteRequest
NTSTATUS NTAPI IoCreateSymbolicLink(IN PUNICODE_STRING SymbolicLinkName, IN PUNICODE_STRING DeviceName)
NTSTATUS NTAPI IoDeleteSymbolicLink(IN PUNICODE_STRING SymbolicLinkName)
PEPROCESS NTAPI IoGetCurrentProcess(VOID)
NTSTATUS NTAPI IoCheckEaBufferValidity(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
NTSTATUS NTAPI PsCreateSystemThread(OUT PHANDLE ThreadHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN HANDLE ProcessHandle, IN PCLIENT_ID ClientId, IN PKSTART_ROUTINE StartRoutine, IN PVOID StartContext)
NTSTATUS NTAPI SeCreateClientSecurityFromSubjectContext(_In_ PSECURITY_SUBJECT_CONTEXT SubjectContext, _In_ PSECURITY_QUALITY_OF_SERVICE ClientSecurityQos, _In_ BOOLEAN ServerIsRemote, _Out_ PSECURITY_CLIENT_CONTEXT ClientContext)
Creates a client security context based upon the captured security subject context.
NTSTATUS NTAPI SeImpersonateClientEx(_In_ PSECURITY_CLIENT_CONTEXT ClientContext, _In_opt_ PETHREAD ServerThread)
Extended function that impersonates a client.
NTSTATUS NTAPI SeQueryAuthenticationIdToken(_In_ PACCESS_TOKEN Token, _Out_ PLUID LogonId)
Queries the authentication ID of an access token.
#define RxAllocatePoolWithTag
#define STATUS_INTERNAL_ERROR
#define STATUS_NETWORK_NAME_DELETED
#define STATUS_NONEXISTENT_EA_ENTRY
#define STATUS_IO_REPARSE_TAG_INVALID
#define STATUS_NETWORK_UNREACHABLE
#define STATUS_IO_REPARSE_TAG_MISMATCH
#define STATUS_DELETE_PENDING
#define STATUS_FILE_LOCK_CONFLICT
#define STATUS_BAD_NETWORK_NAME
#define STATUS_EA_CORRUPT_ERROR
#define STATUS_INVALID_BUFFER_SIZE
#define STATUS_NETWORK_ACCESS_DENIED
#define STATUS_NO_EAS_ON_FILE
#define STATUS_REDIRECTOR_HAS_OPEN_HANDLES
#define STATUS_INVALID_NETWORK_RESPONSE
#define STATUS_RANGE_NOT_LOCKED
#define STATUS_NOT_A_REPARSE_POINT
#define STATUS_BAD_NETWORK_PATH
#define STATUS_FILE_INVALID
#define STATUS_IO_REPARSE_DATA_INVALID
#define STATUS_EAS_NOT_SUPPORTED
#define STATUS_REDIRECTOR_STARTED
#define STATUS_CONNECTION_DISCONNECTED
#define STATUS_LOCK_NOT_GRANTED
#define STATUS_UNEXPECTED_NETWORK_ERROR
#define STATUS_EA_TOO_LARGE
#define STATUS_NET_WRITE_FAULT
#define STATUS_NAME_TOO_LONG
#define STATUS_NO_MORE_EAS
#define STATUS_NOT_SAME_DEVICE
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
#define RxIsPrefixTableLockAcquired(T)
#define RxAcquirePrefixTableLockExclusive(T, W)
#define RxReleasePrefixTableLock(T)
#define FSCTL_GET_REPARSE_POINT
#define FSCTL_SET_REPARSE_POINT
#define FILE_DEVICE_NETWORK_FILE_SYSTEM
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
static unsigned __int64 next
#define IRP_MJ_DEVICE_CONTROL
struct _FILE_FS_VOLUME_INFORMATION FILE_FS_VOLUME_INFORMATION
#define RtlUTF8ToUnicodeN
#define RxDereferenceAndDeleteRxContext(RXCONTEXT)
PRX_CONTEXT NTAPI RxCreateRxContext(_In_ PIRP Irp, _In_ PRDBSS_DEVICE_OBJECT RxDeviceObject, _In_ ULONG InitialContextFlags)
VOID NTAPI RxIndicateChangeOfBufferingStateForSrvOpen(PMRX_SRV_CALL SrvCall, PMRX_SRV_OPEN SrvOpen, PVOID SrvOpenKey, PVOID Context)
NTSTATUS NTAPI RxDriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING RegistryPath)
#define RxIsFcbAcquiredExclusive(Fcb)
NTSTATUS NTAPI RxFinalizeConnection(_Inout_ PNET_ROOT NetRoot, _Inout_opt_ PV_NET_ROOT VNetRoot, _In_ LOGICAL ForceFilesClosed)
#define RxIsFcbAcquiredShared(Fcb)
VOID NTAPI RxUnload(_In_ PDRIVER_OBJECT DriverObject)
NTSTATUS NTAPI RxChangeBufferingState(PSRV_OPEN SrvOpen, PVOID Context, BOOLEAN ComputeNewState)
NTSTATUS NTAPI RxPrepareToReparseSymbolicLink(PRX_CONTEXT RxContext, BOOLEAN SymbolicLinkEmbeddedInOldPath, PUNICODE_STRING NewPath, BOOLEAN NewPathIsAbsolute, PBOOLEAN ReparseRequired)
PEPROCESS NTAPI RxGetRDBSSProcess(VOID)
FORCEINLINE VOID NTAPI RxUnregisterMinirdr(_In_ PRDBSS_DEVICE_OBJECT RxDeviceObject)
NTSTATUS NTAPI RxDispatchToWorkerThread(_In_ PRDBSS_DEVICE_OBJECT pMRxDeviceObject, _In_ WORK_QUEUE_TYPE WorkQueueType, _In_ PRX_WORKERTHREAD_ROUTINE Routine, _In_ PVOID pContext)
_Check_return_ _CRTIMP int __cdecl wcsncmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
#define RDBSS_NTC_NETROOT
#define RX_SCAVENGER_MASK
#define RDBSS_NTC_SRVCALL
#define RDBSS_NTC_MINIRDR_DISPATCH
enum _RX_FILE_TYPE RX_FILE_TYPE
#define RDBSS_STORAGE_NTC(x)
#define RDBSS_NTC_V_NETROOT
#define RDBSS_NTC_SRVOPEN
#define ZeroAndInitializeNodeType(Node, Type, Size)
struct _FILE_STANDARD_INFORMATION * PFILE_STANDARD_INFORMATION
#define FileAccessInformation
#define FileStandardInformation
#define STATUS_CANNOT_DELETE
#define STATUS_MORE_PROCESSING_REQUIRED
#define STATUS_END_OF_FILE
#define SYMLINK_FLAG_RELATIVE
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
struct _REPARSE_DATA_BUFFER * PREPARSE_DATA_BUFFER
PULONG MinorVersion OPTIONAL
base of all file and directory entries
struct _IO_STACK_LOCATION::@4104::@4123 SetSecurity
struct _IO_STACK_LOCATION::@4104::@4122 QuerySecurity
union _IO_STACK_LOCATION::@1611 Parameters
struct _LIST_ENTRY * Flink
XXCTL_LOWIO_COMPONENT IoCtl
XXCTL_LOWIO_COMPONENT FsCtl
struct _LOWIO_CONTEXT::@2149::@2151 Locks
union _LOWIO_CONTEXT::@2149 ParamsFor
struct _LOWIO_CONTEXT::@2149::@2150 ReadWrite
UNICODE_STRING UnicodeQueryTemplate
volatile ULONG NumberOfSrvOpens
volatile ULONG NumberOfFcbs
PMRX_SRVCALL_CALLBACK CallBack
PVOID RecommunicateContext
PMRX_SRVCALLDOWN_STRUCTURE SrvCalldownStructure
PUNICODE_STRING pSrvCallName
ACCESS_MASK DesiredAccess
PMRX_V_NET_ROOT pVNetRoot
PUNICODE_STRING pAlreadyPrefixedName
NODE_BYTE_SIZE NodeByteSize
HANDLE SharedMemorySection
BYTE VolAttrs[VOL_ATTR_LEN]
PRDBSS_DEVICE_OBJECT DeviceObject
NODE_TYPE_CODE NodeTypeCode
NODE_BYTE_SIZE NodeByteSize
NODE_TYPE_CODE NodeTypeCode
FILE_BASIC_INFORMATION BasicInfo
FILE_STANDARD_INFORMATION StandardInfo
NODE_TYPE_CODE NodeTypeCode
NODE_BYTE_SIZE NodeByteSize
SECURITY_CLIENT_CONTEXT sec_ctx
WCHAR srv_buffer[SERVER_NAME_BUFFER_SIZE]
WCHAR mntpt_buffer[MAX_PATH]
NODE_BYTE_SIZE NodeByteSize
NODE_TYPE_CODE NodeTypeCode
PMRX_SRV_CALL pRdbssSrvCall
WCHAR NameBuffer[SERVER_NAME_BUFFER_SIZE]
NODE_TYPE_CODE NodeTypeCode
FILE_FS_ATTRIBUTE_INFORMATION FsAttrs
NODE_BYTE_SIZE NodeByteSize
SECURITY_CLIENT_CONTEXT mount_sec_ctx
struct _REPARSE_DATA_BUFFER::@334::@336 SymbolicLinkReparseBuffer
ULONG_PTR InformationToReturn
struct _RX_CONTEXT::@2230::@2238 Info
LOWIO_CONTEXT LowIoContext
struct _RX_CONTEXT::@2232::@2245 QueryDirectory
PIO_STACK_LOCATION CurrentIrpSp
PMRX_SRV_OPEN pRelevantSrvOpen
PACCESS_TOKEN ClientToken
SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
RX_PREFIX_ENTRY PrefixEntry
struct _nfs3_attrs::@780 rdev
struct _updowncall_entry::@781::@783 ReadWrite
FILE_STANDARD_INFORMATION sinfo
PSECURITY_CLIENT_CONTEXT psec_ctx
BOOLEAN ReturnSingleEntry
struct _updowncall_entry::@781::@788 QueryFile
struct _updowncall_entry::@781::@786 Open
union _updowncall_entry::@781 u
struct _updowncall_entry::@781::@785 Unlock
struct _updowncall_entry::@781::@791 QueryEa
struct _updowncall_entry::@781::@787 Close
PFILE_FS_ATTRIBUTE_INFORMATION FsAttrs
FS_INFORMATION_CLASS query
SECURITY_INFORMATION query
struct _updowncall_entry::@781::@794 Acl
struct _updowncall_entry::@781::@792 Symlink
struct _updowncall_entry::@781::@784 Lock
SECURITY_CLIENT_CONTEXT sec_ctx
nfs41_updowncall_state state
FILE_BASIC_INFORMATION binfo
FILE_INFORMATION_CLASS InfoClass
struct _updowncall_entry::@781::@790 SetEa
struct _updowncall_entry::@781::@793 Volume
struct _updowncall_entry::@781::@789 SetFile
struct _updowncall_entry::@781::@782 Mount
VOID NTAPI SeReleaseSubjectContext(_In_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
Releases both the primary and client tokens of a security subject context.
VOID NTAPI SeCaptureSubjectContext(_Out_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
Captures the security subject context of the calling thread and calling process.
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_DIRECTORY_NOT_EMPTY
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_FILE_IS_A_DIRECTORY
#define STATUS_NOT_A_DIRECTORY
#define STATUS_MEDIA_WRITE_PROTECTED
#define STATUS_ACCESS_DENIED
#define STATUS_OBJECT_PATH_NOT_FOUND
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_TOO_MANY_LINKS
#define STATUS_NO_SUCH_FILE
#define STATUS_OBJECT_NAME_COLLISION
#define STATUS_INVALID_USER_BUFFER
#define STATUS_SHARING_VIOLATION
#define STATUS_OBJECT_NAME_INVALID
#define STATUS_INSUFFICIENT_RESOURCES
#define STATUS_OBJECT_NAME_NOT_FOUND
#define STATUS_NO_MORE_FILES
struct __nfs41_upcall nfs41_upcall
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
#define DECLARE_CONST_UNICODE_STRING(_variablename, _string)
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFDPC _In_ BOOLEAN Wait
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
static UINT WPARAM LPARAM BOOL ansi
#define ERROR_BAD_NETPATH
#define ERROR_BUFFER_OVERFLOW
#define ERROR_NET_WRITE_FAULT
#define ERROR_SHARING_VIOLATION
#define ERROR_INVALID_EA_HANDLE
#define ERROR_PATH_NOT_FOUND
#define ERROR_EA_FILE_CORRUPT
#define ERROR_NETWORK_UNREACHABLE
#define ERROR_TOO_MANY_LINKS
#define ERROR_FILE_EXISTS
#define ERROR_FILE_TOO_LARGE
#define ERROR_LOCK_VIOLATION
#define ERROR_BAD_NET_RESP
#define ERROR_NO_MORE_FILES
#define ERROR_BAD_FILE_TYPE
#define ERROR_NOT_SAME_DEVICE
#define ERROR_FILE_INVALID
#define ERROR_VC_DISCONNECTED
#define ERROR_FILENAME_EXCED_RANGE
#define ERROR_LOCK_FAILED
#define ERROR_INTERNAL_ERROR
#define ERROR_ATOMIC_LOCKS_NOT_SUPPORTED
#define ERROR_NOT_A_REPARSE_POINT
#define ERROR_NETWORK_ACCESS_DENIED
#define ERROR_INVALID_REPARSE_DATA
#define ERROR_BAD_NET_NAME
#define ERROR_NETNAME_DELETED
_In_ const BITMAPINFO _In_ UINT _In_opt_ HANDLE hSection
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_opt_ PVOID EaBuffer
#define IRP_MJ_FILE_SYSTEM_CONTROL
DRIVER_DISPATCH * PDRIVER_DISPATCH
#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE
#define IsReparseTagValid(tag)
#define IRP_MJ_INTERNAL_DEVICE_CONTROL
#define IO_REPARSE_TAG_SYMLINK
#define SL_FAIL_IMMEDIATELY
#define FO_SYNCHRONOUS_IO
#define SL_EXCLUSIVE_LOCK
#define IRP_MJ_MAXIMUM_FUNCTION
#define MDL_MAPPING_CAN_FAIL
#define ObDereferenceObject
#define RtlEqualLuid(Luid1, Luid2)
#define SeStopImpersonatingClient()
#define LABEL_SECURITY_INFORMATION
#define DACL_SECURITY_INFORMATION
#define SECURITY_STATIC_TRACKING
#define SECURITY_DESCRIPTOR_REVISION
#define SACL_SECURITY_INFORMATION
#define SECURITY_DYNAMIC_TRACKING