Skip navigation.
 
mlRe: FOUND Workaround Re: Disk Utility....
FROM : Andy Satori
DATE : Tue Oct 05 22:03:37 2004

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_removed>> 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_removed>)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>>
>> This email sent to <email_removed>

>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
>

Related mailsAuthorDate
mlDisk Utility.... Martha Espinosa Oct 5, 18:31
mlRe: Disk Utility.... Finlay Dobbie Oct 5, 18:36
mlFOUND Workaround Re: Disk Utility.... Martha Espinosa Oct 5, 21:36
mlRe: FOUND Workaround Re: Disk Utility.... Andy Satori Oct 5, 22:03
mlRe: FOUND Workaround Re: Disk Utility.... stephane sudre Oct 6, 11:17
mlRe: FOUND Workaround Re: Disk Utility.... Andy Satori Oct 6, 15:51