From ebe3a779b159152df07722b073b28e7c8fc33b23 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Mon, 13 May 2013 13:05:16 +0000 Subject: [PATCH] [LSASRV] - LsapCheckLogonProcess: Open client process using the PROCESS_DUP_HANDLE access right because we need to duplicate the logon token back into the clients handle table. svn path=/trunk/; revision=59013 --- reactos/dll/win32/lsasrv/authport.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/reactos/dll/win32/lsasrv/authport.c b/reactos/dll/win32/lsasrv/authport.c index fd2c97a2dd5..491e7205e33 100644 --- a/reactos/dll/win32/lsasrv/authport.c +++ b/reactos/dll/win32/lsasrv/authport.c @@ -59,7 +59,7 @@ LsapCheckLogonProcess(PLSA_API_MSG RequestMsg, NULL); Status = NtOpenProcess(&ProcessHandle, - PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION, + PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION | PROCESS_DUP_HANDLE, &ObjectAttributes, &RequestMsg->h.ClientId); if (!NT_SUCCESS(Status)) @@ -163,10 +163,11 @@ AuthPortThreadRoutine(PVOID Param) for (;;) { + TRACE("Reply: %p\n", ReplyMsg); Status = NtReplyWaitReceivePort(AuthPortHandle, (PVOID*)&LogonContext, - &ReplyMsg->h, - &RequestMsg.h); + (PPORT_MESSAGE)ReplyMsg, + (PPORT_MESSAGE)&RequestMsg); if (!NT_SUCCESS(Status)) { TRACE("NtReplyWaitReceivePort() failed (Status %lx)\n", Status); @@ -208,8 +209,8 @@ AuthPortThreadRoutine(PVOID Param) ReplyMsg = &RequestMsg; RequestMsg.Status = STATUS_SUCCESS; - Status = NtReplyPort(AuthPortHandle, - &ReplyMsg->h); + NtReplyPort(AuthPortHandle, + &ReplyMsg->h); LsapDeregisterLogonProcess(&RequestMsg, LogonContext); @@ -230,7 +231,7 @@ AuthPortThreadRoutine(PVOID Param) break; default: - RequestMsg.Status = STATUS_SUCCESS; /* FIXME */ + RequestMsg.Status = STATUS_INVALID_SYSTEM_SERVICE; ReplyMsg = &RequestMsg; break; }