• 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: Launch process as root from cocoa app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Launch process as root from cocoa app


  • Subject: Re: Launch process as root from cocoa app
  • From: Nyxem <email@hidden>
  • Date: Wed, 27 Jan 2010 09:16:25 +0100

It didn't work, I'm gonna try the solution given by Kyle Sluder, with the KeepAlive options of launchd.plist.

On Jan 27, 2010, at 4:34 AM, Charles Srstka wrote:

> On Jan 25, 2010, at 9:18 PM, Nick Zitzmann wrote:
>
>>
>> On Jan 25, 2010, at 12:57 AM, Nyxem wrote:
>>
>>> 1 - Using the authorizationRef object of my SFAuthorizationView and call AuthorizationExecuteWithPrivileges() ("/bin/launchctl load /Library/LaunchDaemons/com.mydaemon.plist")
>>> 	--> Failed. daemon not launched as root, but as current user.
>>
>> As you've figured out, AEWP() launches apps with root privileges, but it doesn't run them _as_ root. If you need to launch an app as root for whatever reason via AEWP(), then search the archives for a workaround, because I'm pretty sure I've posted at least one workaround for this years ago...
>>
>> Nick Zitzmann
>> <http://www.chronosnet.com/>
>
> It launches the process with an *effective* UID of root. You should be able to make it run as root by using the setuid() function.
>
> However, a better way to go would probably be to use the BetterAuthSample code.
>
> Charles

_______________________________________________

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

References: 
 >Launch process as root from cocoa app (From: Nyxem <email@hidden>)
 >Re: Launch process as root from cocoa app (From: Nick Zitzmann <email@hidden>)
 >Re: Launch process as root from cocoa app (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: How to access iTunes using cocoa
  • Next by Date: Re: Global in NSApplication
  • Previous by thread: Re: Launch process as root from cocoa app
  • Next by thread: NSPredicateEditorRowTemplate and CoreData
  • Index(es):
    • Date
    • Thread