[AntiCheat] Allow process synchronization
This commit is contained in:
parent
2e6f8b1f9d
commit
dc9171f136
@ -427,7 +427,7 @@ namespace Components
|
||||
if (!AddAccessDeniedAce(pDacl, ACL_REVISION, dwPoison, psidArray[0])) return GetLastError();
|
||||
|
||||
// Standard and specific rights not explicitly denied
|
||||
static const DWORD dwAllowed = ~dwPoison & 0x1FFF;
|
||||
static const DWORD dwAllowed = (~dwPoison & 0x1FFF) | SYNCHRONIZE;
|
||||
if (!AddAccessAllowedAce(pDacl, ACL_REVISION, dwAllowed, psidArray[1])) return GetLastError();
|
||||
|
||||
// Because of ACE ordering, System will effectively have dwAllowed even
|
||||
|
@ -19,10 +19,15 @@ namespace Worker
|
||||
printf("Attaching to parent process %d...\n", this->processId);
|
||||
HANDLE processHandle = OpenProcess(SYNCHRONIZE, FALSE, this->processId);
|
||||
|
||||
if ((!processHandle || processHandle == INVALID_HANDLE_VALUE) && !Runner::isProcessAlive())
|
||||
if ((!processHandle || processHandle == INVALID_HANDLE_VALUE))
|
||||
{
|
||||
printf("Unable to attach to parent process\n");
|
||||
return;
|
||||
printf("Passive attach failed, trying actively...\n");
|
||||
|
||||
if (!Runner::isProcessAlive())
|
||||
{
|
||||
printf("Unable to attach to parent process\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
printf("Successfully attached to parent process\n");
|
||||
|
Loading…
Reference in New Issue
Block a user