Author: pschweitzer
Date: Sun Apr 6 16:15:06 2014
New Revision: 62663
URL:
http://svn.reactos.org/svn/reactos?rev=62663&view=rev
Log:
[NPFS]
- Also call NpQueryNameInfo() in FileAllInformation and return its status. This prevents
from returning uninit status
- By default, return STATUS_ILLEGAL_FUNCTION in NpImpersonate(). This prevents from
returning uninit status
- Fix comparison in NpQueryFsVolumeInfo() (remaining len is to be used)
- Properly set the string without space. This allows setting the complete string with 18
bytes.
CID #1102019
CID #1102505
CID #1102506
Modified:
trunk/reactos/drivers/filesystems/npfs/fileinfo.c
trunk/reactos/drivers/filesystems/npfs/fsctrl.c
trunk/reactos/drivers/filesystems/npfs/volinfo.c
Modified: trunk/reactos/drivers/filesystems/npfs/fileinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs/fileinfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs/fileinfo.c [iso-8859-1] Sun Apr 6 16:15:06
2014
@@ -440,6 +440,7 @@
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;
Modified: trunk/reactos/drivers/filesystems/npfs/fsctrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs/fsctrl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs/fsctrl.c [iso-8859-1] Sun Apr 6 16:15:06 2014
@@ -241,16 +241,13 @@
IoStack = IoGetCurrentIrpStackLocation(Irp);
NodeTypeCode = NpDecodeFileObject(IoStack->FileObject, NULL, &Ccb,
&NamedPipeEnd);
- if (NodeTypeCode == NPFS_NTC_CCB)
- {
- if (NamedPipeEnd == FILE_PIPE_SERVER_END)
- {
- Status = NpImpersonateClientContext(Ccb);
- }
- else
- {
- Status = STATUS_ILLEGAL_FUNCTION;
- }
+ if (NodeTypeCode == NPFS_NTC_CCB && NamedPipeEnd == FILE_PIPE_SERVER_END)
+ {
+ Status = NpImpersonateClientContext(Ccb);
+ }
+ else
+ {
+ Status = STATUS_ILLEGAL_FUNCTION;
}
return Status;
Modified: trunk/reactos/drivers/filesystems/npfs/volinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/v…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs/volinfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs/volinfo.c [iso-8859-1] Sun Apr 6 16:15:06
2014
@@ -35,7 +35,7 @@
NameLength = 18;
InfoBuffer->VolumeLabelLength = 18;
- if (NameLength < 18)
+ if (*Length < 18)
{
NameLength = (USHORT)*Length;
Status = STATUS_BUFFER_OVERFLOW;
@@ -45,7 +45,7 @@
Status = STATUS_SUCCESS;
}
- RtlCopyMemory(InfoBuffer->VolumeLabel, L"Named Pipe", NameLength);
+ RtlCopyMemory(InfoBuffer->VolumeLabel, L"NamedPipe", NameLength);
*Length -= NameLength;
TRACE("Leaving, Status = %lx\n", Status);