Re: Load kernel extensions
Re: Load kernel extensions
- Subject: Re: Load kernel extensions
- From: Developer <email@hidden>
- Date: Sat, 28 Jul 2007 13:57:14 -0700
Hello Fabian,
1) Yes, extensions in /Library/Extensions are loaded automatically
Are you sure about that? AFAIK, no kernel extension is loaded
automatically except drivers. IOKit driver kernel extensions can be
loaded automatically by IOKit when IOKit detects the necessary
hardware present during probing, or when IOKit thinks the driver is
required to boot the computer (RootRequired). However, even those
kernel extensions must be in /System/Library/Extensions, not /Library/
Extensions. Non-IOKit kernel extensions are never loaded automatically
by the kernel.
2) Unless these extensions enhance the system as a whole, I would not
put them there but load them when your applications starts
3) To do that, you can either gain those priviledges at installation
time through the installer, or use the Authorization Services
Framework
http://developer.apple.com/documentation/Security/Conceptual/authorization_concepts/index.html
This is one solution. The other solution is to install a launchd
service that loads your kernel extension when your application signals
it has loaded. For example, you can use launchd to create a listening
socket, and your application can connect to that socket to force your
launchd daemon to load. Then when it loads, your launchd daemon can
fork/exec the /sbin/kextload program. If there are security
impliations (e.g. you only want your application to load your kernel
extension) then you'll need to take the suggestion above and use
Authorization Services to fork/exec /sbin/kextload.
Ryan
On 28.07.2007, at 08:32, [nexUmoja] Fabian Jäger wrote:
Hey guys,
I have the following problem: I want to load some kernel extensions
when my application finished launching. Those extensions are bundled
with the application. To load kernel extensions I have to be root
and therefore the user has to be authorized each time he wants to
load the extensions. This seems to be ugly and I am looking for a
better alternative. What about moving my kernel extensions to the
user's /Library/Extensions/? Are those kexts loaded automatically?
How to explain the user why he has to authorize himself? Is there
any builtin functionality to display a description upon
authorization?
Thanks for your help!
Fabian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden