X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/d8f41ccd20de16f8ebe2ccc84d47bf1cb2b26bbb..60c433a9f80a92b51b33f65f1f58883e8fe843be:/Security/utilities/src/debugging.c diff --git a/Security/utilities/src/debugging.c b/Security/utilities/src/debugging.c index 2d421599..68ab7122 100644 --- a/Security/utilities/src/debugging.c +++ b/Security/utilities/src/debugging.c @@ -379,6 +379,18 @@ static void setup_environment_scopes() { ApplyScopeListForIDC(cur_scope, kScopeIDEnvironment); } +#define XPCSCOPESTRWANT "api,account,accountChange,circle,circleChange,circleCreat,flush,fresh,keygen,signing,talkwithkvs" +#define XPCSCOPESTRDONTWANT "-event,http,item,keytrace,lockassertions,otr_keysetup,securityd,server,serverxpc,session,sync,titc,transport,trust,updates,xpc" +static void setup_xpcdefault_scopes() { + + CFDictionaryRef noticeLogging = CFDictionaryCreateForCFTypes(kCFAllocatorDefault, + CFSTR(ASL_STRING_NOTICE), CFSTR(XPCSCOPESTRDONTWANT), NULL); + + ApplyScopeDictionaryForID(noticeLogging, kScopeIDXPC); + + CFReleaseNull(noticeLogging); +} + void __security_debug_init(void) { static dispatch_once_t sdOnceToken; @@ -386,10 +398,10 @@ void __security_debug_init(void) { setup_environment_scopes(); setup_config_settings(); setup_defaults_settings(); + //setup_xpcdefault_scopes(); }); } - // MARK: Log handler recording (e.g. grabbing security logging and sending it to test results). static void clean_aslclient(void *client) {