RE: Determining kext running path
RE: Determining kext running path
- Subject: RE: Determining kext running path
- From: "Carl Smith" <email@hidden>
- Date: Wed, 30 Aug 2006 10:05:24 -0400
- Thread-topic: Determining kext running path
Thanks for the responses people.
To answer the main question everyone is asking...
I just wanted to do an integrity test on the kext. I could hard code the
'supposed' path into the integrity code but as you said "... kext may be
deleted from /System/Library/Extensions (or wherever)..."
Carl
Hi Carl,
On Tue, 29 Aug 2006, Carl Smith wrote:
>
> Can anyone suggest or point me in the right direction as to be able to
> determine the path that my kext is running from? I want my user land
> application to be able to retrieve the path that the connected kext is
> running from.
I looked at this issue a while ago (10.3) and followed the loading code
all the way through. AFAICT there is no way to determine the path the
kext
is 'running from', because it is discarded after loading. This is partly
because kexts don't run from a path: they are loaded and wired, and then
no longer depend on the filesystem. In fact whole kext may be deleted
from
/System/Library/Extensions (or wherever) and have no effect on the
running
system.
> If needed I would retrieve the path from the kext via a getsockopt
call.
> Unless there is some other way via the user land application.
This is the kind of comment which usually provokes the question: 'What
are
you trying to do?' :)
> Thanks
>
> Carl
{P^/
_______________________________________________
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