diff --git a/Source/santad/EventProviders/SNTCachingEndpointSecurityManager.mm b/Source/santad/EventProviders/SNTCachingEndpointSecurityManager.mm index 065e07a54..27e1feb3c 100644 --- a/Source/santad/EventProviders/SNTCachingEndpointSecurityManager.mm +++ b/Source/santad/EventProviders/SNTCachingEndpointSecurityManager.mm @@ -35,6 +35,7 @@ @implementation SNTCachingEndpointSecurityManager { - (instancetype)init { self = [super init]; if (self) { + // TODO(rah): Consider splitting into root/non-root cache _decisionCache = new SantaCache(); } @@ -62,8 +63,7 @@ - (BOOL)respondFromCache:(es_message_t *)m API_AVAILABLE(macos(10.15)) { } return YES; } else if (return_action == ACTION_REQUEST_BINARY || return_action == ACTION_RESPOND_ACK) { - // TODO: Figure out a replacement for this: - //msleep((void *)vnode_id.unsafe_simple_id(), NULL, 0, "", &ts_); + // TODO(rah): Look at a replacement for msleep(), maybe NSCondition usleep(5000); } else { break; @@ -140,8 +140,7 @@ - (void)addToCache:(santa_vnode_id_t)identifier default: break; } - // TODO: Figure out a replacement for this: - // wakeup((void *)identifier.unsafe_simple_id()); + // TODO(rah): Look at a replacement for wakeup(), maybe NSCondition } - (BOOL)flushCacheNonRootOnly:(BOOL)nonRootOnly API_AVAILABLE(macos(10.15)) { @@ -184,8 +183,7 @@ - (santa_action_t)checkCache:(santa_vnode_id_t)vnodeID { - (kern_return_t)removeCacheEntryForVnodeID:(santa_vnode_id_t)vnodeID { _decisionCache->remove(vnodeID); - // TODO: Figure out a replacement for this: - // wakeup((void *)identifier.unsafe_simple_id()); + // TODO(rah): Look at a replacement for wakeup(), maybe NSCondition return 0; }