The edge cases and qualifiers you provide here are very far from my needs. Most executables I want to mute are well protected by SIP, and will never move (MacOS private frameworks, daemons etc. plus few third-party that are also very well defined).
My issue is very blunt. I mute a simple and perfect executable path.
Here are some - my list is much longer, but you'll get the idea:
+(NSSet<NSString *> *) baseBinaryPathWhitelist {
static NSSet *_baseBinaryPath = nil; // any executable in these specific paths will be ignored
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_baseBinaryPath = [NSSet setWithArray: @[
NSProcessInfo.processInfo.arguments[0], // don't inspect our own ITProtector process.
@"/sbin/launchd",
@"/bin/launchctl",
@"/bin/ps",
@"/bin/sleep",
@"/usr/bin/dscl",
@"/usr/bin/log",
@"/usr/bin/vmmap",
@"/usr/sbin/syslogd",
@"/usr/sbin/spindump",
@"/usr/sbin/usernoted",
@"/usr/sbin/securityd",
@"/usr/sbin/ipconfig",
@"/usr/libexec/biomesyncd",
@"/usr/libexec/logd"];
But when I use the newer API (that you say is identical to the old, or rather that the 'old' API translates to the newer)
Then I get lots of ES events from, for example
@"/usr/sbin/ipconfig"
Although I know for a fact that it was muted upfront, and that calling the muting API returned successfully.
The strangest thing is, if I revert to the deprecated API - and that is ALL that I do, just change a single line of code -- then these events are NOT received anymore. Same array, same executables, no other change.
I don't know how to extract a simple C project to demonstrate the issue, because my code is big and quite complicated, but I will make an attempt to provide such sample.
Topic:
App & System Services
SubTopic:
Core OS
Tags: