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