Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A problematic combination of malloc and getCharacters.



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.