- 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
This commit is contained in:
Eric Kohl 2013-05-13 13:05:16 +00:00
parent 5bd23c2e51
commit ebe3a779b1

View file

@ -59,7 +59,7 @@ LsapCheckLogonProcess(PLSA_API_MSG RequestMsg,
NULL); NULL);
Status = NtOpenProcess(&ProcessHandle, 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, &ObjectAttributes,
&RequestMsg->h.ClientId); &RequestMsg->h.ClientId);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
@ -163,10 +163,11 @@ AuthPortThreadRoutine(PVOID Param)
for (;;) for (;;)
{ {
TRACE("Reply: %p\n", ReplyMsg);
Status = NtReplyWaitReceivePort(AuthPortHandle, Status = NtReplyWaitReceivePort(AuthPortHandle,
(PVOID*)&LogonContext, (PVOID*)&LogonContext,
&ReplyMsg->h, (PPORT_MESSAGE)ReplyMsg,
&RequestMsg.h); (PPORT_MESSAGE)&RequestMsg);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
TRACE("NtReplyWaitReceivePort() failed (Status %lx)\n", Status); TRACE("NtReplyWaitReceivePort() failed (Status %lx)\n", Status);
@ -208,8 +209,8 @@ AuthPortThreadRoutine(PVOID Param)
ReplyMsg = &RequestMsg; ReplyMsg = &RequestMsg;
RequestMsg.Status = STATUS_SUCCESS; RequestMsg.Status = STATUS_SUCCESS;
Status = NtReplyPort(AuthPortHandle, NtReplyPort(AuthPortHandle,
&ReplyMsg->h); &ReplyMsg->h);
LsapDeregisterLogonProcess(&RequestMsg, LsapDeregisterLogonProcess(&RequestMsg,
LogonContext); LogonContext);
@ -230,7 +231,7 @@ AuthPortThreadRoutine(PVOID Param)
break; break;
default: default:
RequestMsg.Status = STATUS_SUCCESS; /* FIXME */ RequestMsg.Status = STATUS_INVALID_SYSTEM_SERVICE;
ReplyMsg = &RequestMsg; ReplyMsg = &RequestMsg;
break; break;
} }