diff --git a/reactos/drivers/filesystems/npfs/fileinfo.c b/reactos/drivers/filesystems/npfs/fileinfo.c index e39feb9ef5f..d6f2a103082 100644 --- a/reactos/drivers/filesystems/npfs/fileinfo.c +++ b/reactos/drivers/filesystems/npfs/fileinfo.c @@ -440,6 +440,7 @@ NpCommonQueryInformation(IN PDEVICE_OBJECT DeviceObject, NpQueryInternalInfo(Ccb, &AllInfo->InternalInformation, &Length); NpQueryEaInfo(Ccb, &AllInfo->EaInformation, &Length); NpQueryPositionInfo(Ccb, &AllInfo->PositionInformation, &Length, NamedPipeEnd); + Status = NpQueryNameInfo(Ccb, &AllInfo->NameInformation, &Length); Length += 96; break; diff --git a/reactos/drivers/filesystems/npfs/fsctrl.c b/reactos/drivers/filesystems/npfs/fsctrl.c index dc3526d35ea..74826f828d7 100644 --- a/reactos/drivers/filesystems/npfs/fsctrl.c +++ b/reactos/drivers/filesystems/npfs/fsctrl.c @@ -241,16 +241,13 @@ NpImpersonate(IN PDEVICE_OBJECT DeviceObject, IoStack = IoGetCurrentIrpStackLocation(Irp); NodeTypeCode = NpDecodeFileObject(IoStack->FileObject, NULL, &Ccb, &NamedPipeEnd); - if (NodeTypeCode == NPFS_NTC_CCB) + if (NodeTypeCode == NPFS_NTC_CCB && NamedPipeEnd == FILE_PIPE_SERVER_END) { - if (NamedPipeEnd == FILE_PIPE_SERVER_END) - { - Status = NpImpersonateClientContext(Ccb); - } - else - { - Status = STATUS_ILLEGAL_FUNCTION; - } + Status = NpImpersonateClientContext(Ccb); + } + else + { + Status = STATUS_ILLEGAL_FUNCTION; } return Status; diff --git a/reactos/drivers/filesystems/npfs/volinfo.c b/reactos/drivers/filesystems/npfs/volinfo.c index 54c9240e51c..a8449ef9a84 100644 --- a/reactos/drivers/filesystems/npfs/volinfo.c +++ b/reactos/drivers/filesystems/npfs/volinfo.c @@ -35,7 +35,7 @@ NpQueryFsVolumeInfo(IN PVOID Buffer, NameLength = 18; InfoBuffer->VolumeLabelLength = 18; - if (NameLength < 18) + if (*Length < 18) { NameLength = (USHORT)*Length; Status = STATUS_BUFFER_OVERFLOW; @@ -45,7 +45,7 @@ NpQueryFsVolumeInfo(IN PVOID Buffer, Status = STATUS_SUCCESS; } - RtlCopyMemory(InfoBuffer->VolumeLabel, L"Named Pipe", NameLength); + RtlCopyMemory(InfoBuffer->VolumeLabel, L"NamedPipe", NameLength); *Length -= NameLength; TRACE("Leaving, Status = %lx\n", Status);