Code: Select all
/*********************************************************************
* OSKextIsInExcludeList checks to see if the given kext is in the
* kext exclude list (com.apple.driver.KextExcludeList). If useCache
* is TRUE, we will use the cached copy of the exclude list.
* If useCache is FALSE, we will refresh the cache from disk. The
* kext exclude list rarely changes but to insure you have the most
* recent copy in the cache pass FALSE for the first call and TRUE for
* subsequent calls (when dealing with a large list of kexts).
* theKext can be NULL if you just want the invalidate the cache.
*********************************************************************/
Code: Select all
if ([b]OSKextIsInExcludeList[/b](theKext, true)) {
OSKextLogCFString(NULL,
kOSKextLogErrorLevel | kOSKextLogValidationFlag,
CFSTR("Kext rejected due to presence on exclude list: %@"),
theKext);
messageTraceExcludedKext(theKext);
result = false;
goto finish;
}