• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Running Shell Script from Cocoa Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Running Shell Script from Cocoa Application
      • From: Jaime Magiera <email@hidden>
References: 
 >Running Shell Script from Cocoa Application (From: JanakiRam <email@hidden>)
 >Re: Running Shell Script from Cocoa Application (From: Sam DeVore <email@hidden>)
 >Re: Running Shell Script from Cocoa Application (From: Daniel Dalquen <email@hidden>)
 >Re: Running Shell Script from Cocoa Application (From: "Clark Cox" <email@hidden>)

  • Prev by Date: Re: What is Object Class Name used for in bindings?
  • Next by Date: LDAP Objective-C Framework
  • Previous by thread: Re: Running Shell Script from Cocoa Application
  • Next by thread: Re: Running Shell Script from Cocoa Application
  • Index(es):
    • Date
    • Thread