Author: tfaber
Date: Sun Apr 6 07:54:57 2014
New Revision: 62641
URL:
http://svn.reactos.org/svn/reactos?rev=62641&view=rev
Log:
[NPFS]
- Fix some uninitialized and over-initialized variables and some DPRINTs. CID 1102515
Modified:
trunk/reactos/drivers/filesystems/npfs/create.c
Modified: trunk/reactos/drivers/filesystems/npfs/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/c…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs/create.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs/create.c [iso-8859-1] Sun Apr 6 07:54:57 2014
@@ -96,7 +96,7 @@
IoStatus.Information = 0;
}
- TRACE("Leaving, IoStatus = %lx\n", IoStatus);
+ TRACE("Leaving, IoStatus.Status = %lx\n", IoStatus.Status);
return IoStatus;
}
@@ -122,7 +122,6 @@
PNP_CCB Ccb = NULL;
TRACE("Entered\n");
- IoStatus.Status = STATUS_SUCCESS;
IoStatus.Information = 0;
Privileges = NULL;
@@ -172,7 +171,7 @@
((GrantedAccess & FILE_WRITE_DATA) && (NamedPipeConfiguration ==
FILE_PIPE_OUTBOUND)))
{
IoStatus.Status = STATUS_ACCESS_DENIED;
- TRACE("Leaving, IoStatus = %lx\n", IoStatus);
+ TRACE("Leaving, IoStatus.Status = %lx\n", IoStatus.Status);
return IoStatus;
}
@@ -191,7 +190,7 @@
if (NextEntry == ListHead)
{
IoStatus.Status = STATUS_PIPE_NOT_AVAILABLE;
- TRACE("Leaving, IoStatus = %lx\n", IoStatus);
+ TRACE("Leaving, IoStatus.Status = %lx\n", IoStatus.Status);
return IoStatus;
}
@@ -202,7 +201,7 @@
if (!NT_SUCCESS(IoStatus.Status))
{
NpUninitializeSecurity(Ccb);
- TRACE("Leaving, IoStatus = %lx\n", IoStatus);
+ TRACE("Leaving, IoStatus.Status = %lx\n", IoStatus.Status);
return IoStatus;
}
@@ -211,7 +210,7 @@
IoStatus.Information = FILE_OPENED;
IoStatus.Status = STATUS_SUCCESS;
- TRACE("Leaving, IoStatus = %lx\n", IoStatus);
+ TRACE("Leaving, IoStatus.Status = %lx\n", IoStatus.Status);
return IoStatus;
}
@@ -373,7 +372,6 @@
ACCESS_MASK DesiredAccess;
LIST_ENTRY DeferredList;
UNICODE_STRING Prefix;
- NTSTATUS Status;
TRACE("Entered\n");
InitializeListHead(&DeferredList);
@@ -384,7 +382,6 @@
DesiredAccess = IoStack->Parameters.CreatePipe.SecurityContext->DesiredAccess;
IoStatus.Information = 0;
- IoStatus.Status = STATUS_SUCCESS;
FsRtlEnterFileSystem();
ExAcquireResourceExclusiveLite(&NpVcb->Lock, TRUE);
@@ -428,8 +425,8 @@
goto Quickie;
}
- Status = NpTranslateAlias(&FileName);
- if (!NT_SUCCESS(Status)) goto Quickie;
+ IoStatus.Status = NpTranslateAlias(&FileName);
+ if (!NT_SUCCESS(IoStatus.Status)) goto Quickie;
if (RelatedFileObject)
{
@@ -543,6 +540,8 @@
SubjectSecurityContext = &AccessState->SubjectSecurityContext;
SeLockSubjectContext(SubjectSecurityContext);
+ IoStatus.Information = 0;
+
AccessGranted = SeAccessCheck(Fcb->SecurityDescriptor,
SubjectSecurityContext,
TRUE,
@@ -581,21 +580,21 @@
SeUnlockSubjectContext(SubjectSecurityContext);
if (!AccessGranted)
{
- TRACE("Leaving, IoStatus = %lx\n", IoStatus);
+ TRACE("Leaving, IoStatus.Status = %lx\n", IoStatus.Status);
return IoStatus;
}
if (Fcb->CurrentInstances >= Fcb->MaximumInstances)
{
IoStatus.Status = STATUS_INSTANCE_NOT_AVAILABLE;
- TRACE("Leaving, IoStatus = %lx\n", IoStatus);
+ TRACE("Leaving, IoStatus.Status = %lx\n", IoStatus.Status);
return IoStatus;
}
if (Disposition == FILE_CREATE)
{
IoStatus.Status = STATUS_ACCESS_DENIED;
- TRACE("Leaving, IoStatus = %lx\n", IoStatus);
+ TRACE("Leaving, IoStatus.Status = %lx\n", IoStatus.Status);
return IoStatus;
}
@@ -616,7 +615,7 @@
if (CheckShareAccess != ShareAccess)
{
IoStatus.Status = STATUS_ACCESS_DENIED;
- TRACE("Leaving, IoStatus = %lx\n", IoStatus);
+ TRACE("Leaving, IoStatus.Status = %lx\n", IoStatus.Status);
return IoStatus;
}
@@ -638,7 +637,7 @@
{
--Ccb->Fcb->CurrentInstances;
NpDeleteCcb(Ccb, List);
- TRACE("Leaving, IoStatus = %lx\n", IoStatus);
+ TRACE("Leaving, IoStatus.Status = %lx\n", IoStatus.Status);
return IoStatus;
}
@@ -647,8 +646,8 @@
NpCheckForNotify(Fcb->ParentDcb, 0, List);
IoStatus.Status = STATUS_SUCCESS;
- IoStatus.Information = 1;
- TRACE("Leaving, IoStatus = %lx\n", IoStatus);
+ IoStatus.Information = FILE_OPENED;
+ TRACE("Leaving, IoStatus.Status = %lx\n", IoStatus.Status);
return IoStatus;
}
@@ -664,7 +663,7 @@
IN PNAMED_PIPE_CREATE_PARAMETERS Parameters,
IN PEPROCESS Process,
IN PLIST_ENTRY List,
- IN PIO_STATUS_BLOCK IoStatus)
+ OUT PIO_STATUS_BLOCK IoStatus)
{
NTSTATUS Status;
USHORT NamedPipeConfiguration;
@@ -817,7 +816,6 @@
FileName = FileObject->FileName;
- IoStatus.Status = STATUS_SUCCESS;
IoStatus.Information = 0;
FsRtlEnterFileSystem();