DPRINT("NpfsConnectPipe()\n");
+ /* Fail, if the CCB is not a pipe CCB */
+ if (Ccb->Type != CCB_PIPE)
+ {
+ DPRINT1("Not a pipe\n");
+ return STATUS_ILLEGAL_FUNCTION;
+ }
+
+ /* Fail, if the CCB is not a server end CCB */
+ if (Ccb->PipeEnd != FILE_PIPE_SERVER_END)
+ {
+ DPRINT1("Not the server end\n");
+ return STATUS_ILLEGAL_FUNCTION;
+ }
+
if (Ccb->PipeState == FILE_PIPE_CONNECTED_STATE)
{
KeResetEvent(&Ccb->ConnectEvent);
DPRINT("NpfsDisconnectPipe()\n");
+ /* Fail, if the CCB is not a pipe CCB */
+ if (Ccb->Type != CCB_PIPE)
+ {
+ DPRINT1("Not a pipe\n");
+ return STATUS_ILLEGAL_FUNCTION;
+ }
+
+ /* Fail, if the CCB is not a server end CCB */
+ if (Ccb->PipeEnd != FILE_PIPE_SERVER_END)
+ {
+ DPRINT1("Not the server end\n");
+ return STATUS_ILLEGAL_FUNCTION;
+ }
+
Fcb = Ccb->Fcb;
KeLockMutex(&Fcb->CcbListLock);