Properly define magic values for CCB and DFS

svn path=/trunk/; revision=74189
This commit is contained in:
Pierre Schweitzer 2017-03-18 14:03:45 +00:00
parent 6261af5945
commit e49ac92a99
2 changed files with 7 additions and 3 deletions

View file

@ -1804,7 +1804,7 @@ QueryPathCompletionRoutine(PDEVICE_OBJECT DeviceObject,
MasterQueryContext->LatestProvider = QueryContext->UncProvider; MasterQueryContext->LatestProvider = QueryContext->UncProvider;
MasterQueryContext->LatestStatus = Status; MasterQueryContext->LatestStatus = Status;
if (MasterQueryContext->FileObject->FsContext2 != DFS_MAGIC_CCB) if (MasterQueryContext->FileObject->FsContext2 != (PVOID)DFS_DOWNLEVEL_OPEN_CONTEXT)
{ {
/* Allocate a buffer for the prefix */ /* Allocate a buffer for the prefix */
AcceptedPrefix = ExAllocatePoolWithTag(PagedPool, QueryResponse->LengthAccepted, TAG_MUP); AcceptedPrefix = ExAllocatePoolWithTag(PagedPool, QueryResponse->LengthAccepted, TAG_MUP);
@ -2045,7 +2045,7 @@ CreateRedirectedFile(PIRP Irp,
} }
/* Ok, at that point, that's a regular MUP opening (if no DFS) */ /* Ok, at that point, that's a regular MUP opening (if no DFS) */
if (!MupEnableDfs || FileObject->FsContext2 == DFS_MAGIC_CCB) if (!MupEnableDfs || FileObject->FsContext2 == (PVOID)DFS_DOWNLEVEL_OPEN_CONTEXT)
{ {
/* We won't complete immediately */ /* We won't complete immediately */
IoMarkIrpPending(Irp); IoMarkIrpPending(Irp);

View file

@ -17,9 +17,13 @@
#define TAG_MUP ' puM' #define TAG_MUP ' puM'
#define DFS_MAGIC_CCB (PVOID)0x11444653
#define FILE_SIMPLE_RIGHTS_MASK (FILE_ALL_ACCESS & ~STANDARD_RIGHTS_REQUIRED &~ SYNCHRONIZE) #define FILE_SIMPLE_RIGHTS_MASK (FILE_ALL_ACCESS & ~STANDARD_RIGHTS_REQUIRED &~ SYNCHRONIZE)
#define DFS_OPEN_CONTEXT 0xFF444653
#define DFS_DOWNLEVEL_OPEN_CONTEXT 0x11444653
#define DFS_CSCAGENT_NAME_CONTEXT 0xAAAAAAAA
#define DFS_USER_NAME_CONTEXT 0xBBBBBBBB
#define NODE_TYPE_VCB 0x1 #define NODE_TYPE_VCB 0x1
#define NODE_TYPE_UNC 0x2 #define NODE_TYPE_UNC 0x2
#define NODE_TYPE_PFX 0x3 #define NODE_TYPE_PFX 0x3