mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-09 22:37:04 +00:00
[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:
parent
563ad18f4e
commit
d57b5a320e
@ -111,7 +111,7 @@ bool adjustPriv(const char * name, DWORD attributes)
|
|||||||
{
|
{
|
||||||
doLog("failed to open the process\n");
|
doLog("failed to open the process\n");
|
||||||
winerr();
|
winerr();
|
||||||
return -1;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!LookupPrivilegeValueA(NULL, name, &luid))
|
if (!LookupPrivilegeValueA(NULL, name, &luid))
|
||||||
|
Loading…
Reference in New Issue
Block a user