[host] windows: remove ImpersonateLoggedOnUser call

It shouldn't have any effect, since the host application is created with
the token, and there is no need for the service itself to impersonate.

In practice, removal doesn't appear to have any effect on the ability to
capture privileged things like secure desktop.
This commit is contained in:
Quantum 2021-01-14 20:53:45 -05:00 committed by Geoffrey McRae
parent 789f21ccb3
commit 81561a242f

View File

@ -308,16 +308,6 @@ void Launch(void)
goto fail_token;
}
if (!enablePriv(SE_IMPERSONATE_NAME))
goto fail_token;
if (!ImpersonateLoggedOnUser(hToken))
{
doLog("fail_tokened to impersonate\n");
winerr();
goto fail_token;
}
if (!enablePriv(SE_ASSIGNPRIMARYTOKEN_NAME))
goto fail_token;