[ADVAPI32]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 25 Oct 2014 18:30:05 +0000 (18:30 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 25 Oct 2014 18:30:05 +0000 (18:30 +0000)
* Update ImpersonateNamedPipeClient().
CORE-8540

svn path=/trunk/; revision=64994

reactos/dll/win32/advapi32/wine/security.c

index a8f16d1..4e60c9e 100644 (file)
@@ -954,37 +954,14 @@ InitializeAcl(PACL pAcl,
     return TRUE;
 }
 
-/**********************************************************************
- * ImpersonateNamedPipeClient                  EXPORTED
- *
- * @implemented
- */
-BOOL
-WINAPI
-ImpersonateNamedPipeClient(HANDLE hNamedPipe)
+BOOL WINAPI ImpersonateNamedPipeClient( HANDLE hNamedPipe )
 {
-    IO_STATUS_BLOCK StatusBlock;
-    NTSTATUS Status;
+    IO_STATUS_BLOCK io_block;
 
-    TRACE("ImpersonateNamedPipeClient() called\n");
-
-    Status = NtFsControlFile(hNamedPipe,
-                             NULL,
-                             NULL,
-                             NULL,
-                             &StatusBlock,
-                             FSCTL_PIPE_IMPERSONATE,
-                             NULL,
-                             0,
-                             NULL,
-                             0);
-    if (!NT_SUCCESS(Status))
-    {
-        SetLastError(RtlNtStatusToDosError(Status));
-        return FALSE;
-    }
+    TRACE("(%p)\n", hNamedPipe);
 
-    return TRUE;
+    return set_ntstatus( NtFsControlFile(hNamedPipe, NULL, NULL, NULL,
+                         &io_block, FSCTL_PIPE_IMPERSONATE, NULL, 0, NULL, 0) );
 }
 
 /*