• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: A problematic combination of malloc and getCharacters.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A problematic combination of malloc and getCharacters.


  • Subject: Re: A problematic combination of malloc and getCharacters.
  • From: "Shawn Erickson" <email@hidden>
  • Date: Wed, 24 Oct 2007 16:37:37 -0700

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

  • Follow-Ups:
    • Re: A problematic combination of malloc and getCharacters.
      • From: John Stiles <email@hidden>
References: 
 >A problematic combination of malloc and getCharacters. (From: deepak gopal <email@hidden>)

  • Prev by Date: Re: A problematic combination of malloc and getCharacters.
  • Next by Date: Re: Transparent window and opaque objects
  • Previous by thread: Re: A problematic combination of malloc and getCharacters.
  • Next by thread: Re: A problematic combination of malloc and getCharacters.
  • Index(es):
    • Date
    • Thread