RE: Determining kext running path
site_archiver@lists.apple.com Delivered-To: Darwin-kernel@lists.apple.com Thread-index: AcbL21w7VCh9Va0dR+KW6E4Zc7q5AgAYS5Ig 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 (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Carl Smith