• 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
Authorization with NSTask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Authorization with NSTask


  • Subject: Authorization with NSTask
  • From: John Lombardo <email@hidden>
  • Date: Thu, 03 Jul 2003 17:14:01 +0800

Using Apple's Moriaty and Stepwise's SecurityTutorial, I've figured out how
to use NSTasks to execute system tasks, as well as using
AuthorizationExecuteWithPrivileges(...) to run particular executable (such
as /usr/local/bin/pg_ctl) as root. What I can't figure out is how to combine
the two, to run a NSTask as root.

This is the only way I have found to execute a task with root privileges...
err = AuthorizationExecuteWithPrivileges(authorizationRef,
"/usr/local/bin/pg_ctl", 0, args, &pipe);

Is there a way, using NSTasks that I have not found in Apple's reference
PDFs?

Cheers,
John
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Authorization with NSTask
      • From: David Remahl <email@hidden>
  • Prev by Date: Re: Suggesting an initial filename with document-based app?
  • Next by Date: Re: EOF undead?
  • Previous by thread: Re: Really Big NSOpenGLView
  • Next by thread: Re: Authorization with NSTask
  • Index(es):
    • Date
    • Thread