Re: copy some kernel extensions to /tmp directory and then load that kext when program Launches
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=C/rGU96o1jTXt5ECCKwPDpWpvkJfDPSoVh18eo1AINY=; b=ERPvIsZUedc1thTULYHWwiyM9k3sXQITo4+7w524YmDwE6un0jQbcTy+fVSoOt7830 dlKJVXlWYbohTtRFFVvcY4alTI9Mpb/v8DlpLhEOndGms79Tm3BYhWzZ30gbmQUY+m7K ZxCde5Put4ddfLCwSHqYfTIQU8MOMDaQCsWMI= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=BL7IOcGuKbsaEulqXmpk8DkXW5arzhqR/8vIKfG36iDG63lZ3InPtwt1nXIEoR+xEc 9jXRO4a+j5684HmJGlXoq1WHu8a75+sZrY4ufHktmzumiU/MWOUPbukGmrF39L+Xkd0u eYxv51xRJjoewspcWFPV3ObMsoqdAr+HBvYe0= Hello, now the priviledge access, you need to have root access to load and unload a kext e.g adding code in your kernel space, 1- you can use launchd and start the service at boot-time with root priviledge 2- any action in the user-space from a non-root user will apply an authentication what is your job: handling the user-space authentication process: A: you can use: a shell script and running it from your app using various popen-like family functions #!/usr/bin/env bash exec osascript <<EOF do shell script "kextload -t \"${1}\"" with administrator privileges EOF # will return a status 0 or 1 you can check this from your GUI APP B: the same by running a applescript (cf documentation to embed this into your app) do shell script "kextload -t \"" & kext & "\"" with administrator privileges C: the same by running a applescript script thru the osascript command on run argv set kext to (item 1 of argv) do shell script "kextload -t \"" & kext & "\"" with administrator privileges end run D: using Security C API #include <Security/Authorization.h> any of those solutions will pop up a auth dialog Best, _______________________________________________ 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)
-
mm w