Re: Running Shell Script from Cocoa Application
Re: Running Shell Script from Cocoa Application
- Subject: Re: Running Shell Script from Cocoa Application
- From: Daniel Dalquen <email@hidden>
- Date: Sun, 7 Oct 2007 11:09:13 +0200
On Oct 7, 2007, at 4:23 AM, Clark Cox wrote:
However, since the OP wants to execute something with elevated
privileges, *neither* is an appropriate tool for this job (running
shell scripts as root is a *very* bad idea). You really need to use <a
href="http://developer.apple.com/documentation/Security/Conceptual/
authorization_concepts/01introduction/
chapter_1_section_1.html">AuthorizationServices</a>
That's what I want, too, and I am using AuthorizationServices. I'm
just not sure, whether I am using it correctly... I need to copy a
lauchd plist file to /Library/LaunchDeamons, unload an existing
launchd config and load the new one. So, in my app I call an
installer tool with AuthorizationExecuteWithPrivileges() and the
installer then calls setuid(0) before doing the things described
above. Is that correct or how should I do it better?
Daniel
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden