mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
src: launcher: LogonCreateProcess: ImpersonateLoggedOnUser
This commit is contained in:
parent
42e01a9b27
commit
ea873ece22
@ -207,6 +207,10 @@ static BOOL LogonCreateProcess(
|
|||||||
Environment = EnvironmentBlock;
|
Environment = EnvironmentBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Success = ImpersonateLoggedOnUser(LogonToken);
|
||||||
|
if (!Success)
|
||||||
|
goto exit;
|
||||||
|
|
||||||
Success = CreateProcessAsUserW(
|
Success = CreateProcessAsUserW(
|
||||||
LogonToken,
|
LogonToken,
|
||||||
ApplicationName,
|
ApplicationName,
|
||||||
@ -220,6 +224,10 @@ static BOOL LogonCreateProcess(
|
|||||||
StartupInfo,
|
StartupInfo,
|
||||||
ProcessInformation);
|
ProcessInformation);
|
||||||
|
|
||||||
|
if (!RevertToSelf())
|
||||||
|
/* should not happen! */
|
||||||
|
ExitProcess(GetLastError());
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
if (!Success)
|
if (!Success)
|
||||||
LastError = GetLastError();
|
LastError = GetLastError();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user