[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:
1 parent
563ad18f4e
commit
d57b5a320e
1 file changed
+1
-1
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user