Re: FOUND Workaround Re: Disk Utility....
Re: FOUND Workaround Re: Disk Utility....
- Subject: Re: FOUND Workaround Re: Disk Utility....
- From: stephane sudre <email@hidden>
- Date: Wed, 6 Oct 2004 11:17:55 +0200
Le Oct 5, 2004, à 10:03 PM, Andy Satori a écrit :
I recently ran into a similar problem...
I have a PostgreSQL isntallation that I wanted to be able to stop /
start /
restart from a Cocoa GUI App. The problem was that while the
Authentication
stuff from the Security framework did in fact promote the user to admin
rights, it did not in fact allow you to excute an NSTask as root, so
calling
the StartupItem script would fail because ConsoleMessage requires
root, not
just admin.
After poking around a bit, and with some help from my fellow evil-doers
(bringing .NET to Cocoa) in #cocoa# found a solution...
In the end, I created a little BSD Tool that was embedded in, and
called
from the Cocoa App with Admin privs, which then calls the StartupItem
with
ROOT rights.
For the code, see my blog:
http://homepage.mac.com/dru_satori/C304053603/E617707927/index.html
Stupid question: If by StartupItem, you're referring to a component in
Library/StartupItems, why don't you just use SystemStarter?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden