Re: A problematic combination of malloc and getCharacters.
Re: A problematic combination of malloc and getCharacters.
- Subject: Re: A problematic combination of malloc and getCharacters.
- From: deepak gopal <email@hidden>
- Date: Thu, 25 Oct 2007 05:16:38 +0530 (IST)
No Shawn this doesn't work.
----- Original Message ----
From: Shawn Erickson <email@hidden>
To: deepak gopal <email@hidden>
Cc: cocoa dev <email@hidden>
Sent: Wednesday, 24 October, 2007 4:37:37 PM
Subject: Re: A problematic combination of malloc and getCharacters.
On 10/24/07, deepak gopal <email@hidden> wrote:
> Hi
>
> The method performChange would run a script which would modify a
plist.
Try...
- (BOOL)performChange {
NSString* shell = @"/bin/sh";
const char* plistArgs[3];
plistArgs[0] = [copyPlistScript_ UTF8String];
plistArgs[1] = [garage_ fileSystemRepresentation];
plistArgs[2] = NULL;
OSStatus status = AuthorizationExecuteWithPrivileges(authRef_,
[shell UTF8String], 0, &plistArgs, NULL);
if ((status == errAuthorizationCanceled) || (status !=
errAuthorizationSuccess)) {
NSLog(@"Desktop Break Change: Authorization failed when installing
new configuration plists.");
return NO;
}
}
...written in gmail and from memory ... no idea if it compiles.
-Shawn
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Bring your gang together - do your thing. Go to http://in.promos.yahoo.com/groups
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden