From 3753cf3e49717c7c44812ce7bc3c8b9f971da59e Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sat, 5 Nov 2005 16:08:41 +0000 Subject: [PATCH] Open pipe in 'passive' mode if the desired access right is FILE_READ_ATTRIBUTES. svn path=/trunk/; revision=19017 --- reactos/drivers/fs/np/create.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/fs/np/create.c b/reactos/drivers/fs/np/create.c index 773abf7150a..2faef1c70a8 100644 --- a/reactos/drivers/fs/np/create.c +++ b/reactos/drivers/fs/np/create.c @@ -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");