[host] service: fix adjustPriv return value

When OpenProcessToken fails, the function returned -1, which would be true
when converted to bool. This is wrong, and it should be returning false.
This commit is contained in:
Quantum 2021-07-19 18:50:22 -04:00 committed by Geoffrey McRae
parent 563ad18f4e
commit d57b5a320e

View File

@ -111,7 +111,7 @@ bool adjustPriv(const char * name, DWORD attributes)
{
doLog("failed to open the process\n");
winerr();
return -1;
return false;
}
if (!LookupPrivilegeValueA(NULL, name, &luid))