Re: Using mac_policy api's
Re: Using mac_policy api's
- Subject: Re: Using mac_policy api's
- From: Phil Jordan <email@hidden>
- Date: Thu, 06 Jun 2013 15:16:46 +0200
Hi,
On Thu, Jun 6, 2013 at 2:37 PM, simran charley
<email@hidden> wrote:
I am using mac_policy api's. They are working in General kernel extension, but in IOKit I got error message "symbol not found in any library kext" for mac_policy_register() and mac_policy_unregister().
How to use it in IOKit kext?
This has nothing to do with general vs I/O Kit kexts. You need to add the correct KPI, com.apple.kpi.dsep, to the OSBundleLibraries in your kext's info.plist. That should fix the MAC-related link errors.
Also mpo_iokit_check_device_t() is not working in Generi kext, do it need to call from IOKit only?
I don't think this is implemented at all, actually.
This applies to a lot of mac_policy callbacks - some are unused leftovers from BSD, some are disabled in release kernels (e.g. anything with vnode labels), some seem to have originated in Apple-internal experiments that never saw the light of day, and some are useless without some private APIs or structs. (e.g. anything with a struct fileglob argument) Still, the ones that do work are extremely useful of course. :-)
If you grep the kernel source for the main name (the XXX in mpo_XXX_t) you should be able to find where and how a particular callback is used. Or see that it isn't.
HTH
phil
--
http://philjordan.eu/ - Phil Jordan, software development contractor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden