mirror of
https://github.com/reactos/reactos.git
synced 2025-05-06 18:31:26 +00:00
[SECLOGON] Create the remote process
This commit is contained in:
parent
4109072bc8
commit
50a1479c53
1 changed files with 36 additions and 1 deletions
|
@ -59,6 +59,9 @@ SeclCreateProcessWithLogonW(
|
||||||
_In_ SECL_REQUEST *pRequest,
|
_In_ SECL_REQUEST *pRequest,
|
||||||
_Out_ SECL_RESPONSE *pResponse)
|
_Out_ SECL_RESPONSE *pResponse)
|
||||||
{
|
{
|
||||||
|
STARTUPINFOW StartupInfo;
|
||||||
|
PROCESS_INFORMATION ProcessInfo;
|
||||||
|
|
||||||
PROFILEINFOW ProfileInfo;
|
PROFILEINFOW ProfileInfo;
|
||||||
HANDLE hToken = NULL;
|
HANDLE hToken = NULL;
|
||||||
|
|
||||||
|
@ -111,9 +114,41 @@ SeclCreateProcessWithLogonW(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Create Process */
|
ZeroMemory(&StartupInfo, sizeof(StartupInfo));
|
||||||
|
StartupInfo.cb = sizeof(StartupInfo);
|
||||||
|
|
||||||
|
/* FIXME: Get startup info from the caller */
|
||||||
|
|
||||||
|
ZeroMemory(&ProcessInfo, sizeof(ProcessInfo));
|
||||||
|
|
||||||
|
/* Create Process */
|
||||||
|
rc = CreateProcessAsUserW(hToken,
|
||||||
|
pRequest->ApplicationName,
|
||||||
|
pRequest->CommandLine,
|
||||||
|
NULL, // lpProcessAttributes,
|
||||||
|
NULL, // lpThreadAttributes,
|
||||||
|
FALSE, // bInheritHandles,
|
||||||
|
pRequest->dwCreationFlags,
|
||||||
|
NULL, // lpEnvironment,
|
||||||
|
pRequest->CurrentDirectory,
|
||||||
|
&StartupInfo,
|
||||||
|
&ProcessInfo);
|
||||||
|
if (rc == FALSE)
|
||||||
|
{
|
||||||
|
dwError = GetLastError();
|
||||||
|
WARN("CreateProcessAsUser() failed with Error %lu\n", dwError);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FIXME: Pass process info to the caller */
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
if (ProcessInfo.hThread)
|
||||||
|
CloseHandle(ProcessInfo.hThread);
|
||||||
|
|
||||||
|
if (ProcessInfo.hProcess)
|
||||||
|
CloseHandle(ProcessInfo.hProcess);
|
||||||
|
|
||||||
if (ProfileInfo.hProfile != NULL)
|
if (ProfileInfo.hProfile != NULL)
|
||||||
UnloadUserProfile(hToken, ProfileInfo.hProfile);
|
UnloadUserProfile(hToken, ProfileInfo.hProfile);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue