Open pipe in 'passive' mode if the desired access right is FILE_READ_ATTRIBUTES.

svn path=/trunk/; revision=19017
This commit is contained in:
Eric Kohl 2005-11-05 16:08:41 +00:00
parent 7b9a187c56
commit 3753cf3e49

View file

@ -114,18 +114,20 @@ NpfsCreate(PDEVICE_OBJECT DeviceObject,
PNPFS_FCB ServerFcb = NULL;
PNPFS_DEVICE_EXTENSION DeviceExt;
BOOLEAN SpecialAccess;
ACCESS_MASK DesiredAccess;
DPRINT("NpfsCreate(DeviceObject %p Irp %p)\n", DeviceObject, Irp);
DeviceExt = (PNPFS_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
IoStack = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp);
FileObject = IoStack->FileObject;
DesiredAccess = IoStack->Parameters.CreatePipe.SecurityContext->DesiredAccess;
DPRINT("FileObject %p\n", FileObject);
DPRINT("FileName %wZ\n", &FileObject->FileName);
Irp->IoStatus.Information = 0;
SpecialAccess = ((IoStack->Parameters.CreatePipe.ShareAccess & 3) == 3);
SpecialAccess = ((DesiredAccess & SPECIFIC_RIGHTS_ALL) == FILE_READ_ATTRIBUTES);
if (SpecialAccess)
{
DPRINT("NpfsCreate() open client end for special use!\n");