Authorization with NSTask
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.