[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();
|
if (!AddAccessDeniedAce(pDacl, ACL_REVISION, dwPoison, psidArray[0])) return GetLastError();
|
||||||
|
|
||||||
// Standard and specific rights not explicitly denied
|
// 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();
|
if (!AddAccessAllowedAce(pDacl, ACL_REVISION, dwAllowed, psidArray[1])) return GetLastError();
|
||||||
|
|
||||||
// Because of ACE ordering, System will effectively have dwAllowed even
|
// 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);
|
printf("Attaching to parent process %d...\n", this->processId);
|
||||||
HANDLE processHandle = OpenProcess(SYNCHRONIZE, FALSE, 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");
|
printf("Passive attach failed, trying actively...\n");
|
||||||
return;
|
|
||||||
|
if (!Runner::isProcessAlive())
|
||||||
|
{
|
||||||
|
printf("Unable to attach to parent process\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Successfully attached to parent process\n");
|
printf("Successfully attached to parent process\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user