Add 'server/' from commit '800090542d91beae40bc81fc41b67ba61c47da77'
git-subtree-dir: server git-subtree-mainline:6a4054c15agit-subtree-split:800090542d
This commit is contained in:
19
server/agentHook/agentHook.m
Normal file
19
server/agentHook/agentHook.m
Normal file
@@ -0,0 +1,19 @@
|
||||
#import <mach/message.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
||||
#define DYLD_INTERPOSE(_replacment,_replacee) \
|
||||
__attribute__((used)) static struct{ const void* replacment; const void* replacee; } _interpose_##_replacee \
|
||||
__attribute__ ((section ("__DATA,__interpose"))) = { (const void*)(unsigned long)&_replacment, (const void*)(unsigned long)&_replacee };
|
||||
|
||||
|
||||
BOOL IMDAuditTokenTaskHasEntitlement(audit_token_t *auditToken, NSString *entitlement);
|
||||
|
||||
BOOL replacement__IMDAuditTokenTaskHasEntitlement(audit_token_t *auditToken, NSString *entitlement)
|
||||
{
|
||||
// Bypass all entitlement checks
|
||||
return YES;
|
||||
}
|
||||
|
||||
DYLD_INTERPOSE(replacement__IMDAuditTokenTaskHasEntitlement, IMDAuditTokenTaskHasEntitlement);
|
||||
Reference in New Issue
Block a user