Author: ekohl Date: Mon May 13 13:05:16 2013 New Revision: 59013
URL: http://svn.reactos.org/svn/reactos?rev=59013&view=rev Log: [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.
Modified: trunk/reactos/dll/win32/lsasrv/authport.c
Modified: trunk/reactos/dll/win32/lsasrv/authport.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/authport.c... ============================================================================== --- trunk/reactos/dll/win32/lsasrv/authport.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/lsasrv/authport.c [iso-8859-1] Mon May 13 13:05:16 2013 @@ -59,7 +59,7 @@ 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 @@
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 @@
ReplyMsg = &RequestMsg; RequestMsg.Status = STATUS_SUCCESS; - Status = NtReplyPort(AuthPortHandle, - &ReplyMsg->h); + NtReplyPort(AuthPortHandle, + &ReplyMsg->h);
LsapDeregisterLogonProcess(&RequestMsg, LogonContext); @@ -230,7 +231,7 @@ break;
default: - RequestMsg.Status = STATUS_SUCCESS; /* FIXME */ + RequestMsg.Status = STATUS_INVALID_SYSTEM_SERVICE; ReplyMsg = &RequestMsg; break; }