Re: FOUND Workaround Re: Disk Utility....
Re: FOUND Workaround Re: Disk Utility....
- Subject: Re: FOUND Workaround Re: Disk Utility....
- From: Andy Satori <email@hidden>
- Date: Tue, 05 Oct 2004 16:03:37 -0400
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
I apologize for the atrocious format of the code, but iBlog doesn't support
any form of <PRE> tagging.
Andy Satori
On 10/5/04 3:36 PM, "Martha Espinosa" <email@hidden> pounded the keyboard to
produce:
>
I created two separate bash scripts... the only problem is that
>
"Software Update" needs to be ran as root...
>
>
: - )
>
>
>
At 10:31 AM -0600 10/5/04, Martha Espinosa wrote:
>
> Hi,
>
>
>
> Is there a way I can use disk utilities repair disk and fix disk
>
> permissions in my cocoa app? How?
>
>
>
> I have the repair permissions in applescript by doing a do shell
>
> script and diskutil... but this isn't working for me because
>
> applescript doesn't pause/wait until done...
>
>
>
> Thanks in Advance,
>
>
>
> -ME
>
>
>
>
>
>
>
> _______________________________________________
>
> 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
>
>
>
_______________________________________________
>
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
>
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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