CFArrayRef SecAccessGroupsGetCurrent(void) { static CFArrayRef gSecServerAccessGroups; static dispatch_once_t only_do_this_once; dispatch_once(&only_do_this_once, ^{ gSecServerAccessGroups = SecServerCopyAccessGroups(); assert(gSecServerAccessGroups); });
SecurityClient * SecSecurityClientGet(void) { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ gClient.task = NULL, gClient.accessGroups = SecServerCopyAccessGroups(); gClient.allowSystemKeychain = true; gClient.allowSyncBubbleKeychain = true; gClient.isNetworkExtension = false; #if TARGET_OS_IPHONE gClient.inMultiUser = false; gClient.activeUser = 501; #endif });