• 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
SFAuthorization bug / crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SFAuthorization bug / crash


  • Subject: SFAuthorization bug / crash
  • From: Seth Willits <email@hidden>
  • Date: Wed, 7 Apr 2010 17:32:04 -0700

Hi guys,


Strange crash. It happens for one user "on a couple 10.5 machines." objc_assign_strongCast seems to be GC related, but I'm not using GC.

It seems that maybe this is a 10.5 bug where initWithFlags:rights:environment: is returning junk?


Any ideas?



/*
OS Version:      Mac OS X 10.5.8 (9L31a)
Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread:  0

Thread 0 Crashed:
0   ???                             0xa0565027 objc_assign_strongCast + 9
1   com.apple.securityfoundation    0x9770343b -[SFAuthorization obtainWithRight:flags:error:] + 163
2   ...iumgroup.AraeliumFoundation  0x00094413 -[AGAuthentication authorization] + 183
*/


- (SFAuthorization *)authorization;
{
    if (!mAuthorization) {
        AuthorizationFlags flags = kAuthorizationFlagDefaults | kAuthorizationFlagExtendRights | kAuthorizationFlagInteractionAllowed;
        AuthorizationItem item = {kAuthorizationRightExecute, 0, 0, 0}; // system.privilege.admin
        AuthorizationRights rights = {1, &item};

        mAuthorization = [[SFAuthorization alloc] initWithFlags:flags rights:&rights environment:kAuthorizationEmptyEnvironment];

        if (![mAuthorization obtainWithRight:kAuthorizationRightExecute flags:flags error:nil]) {
            [mAuthorization release];
            mAuthorization = nil;
        }
    }

    return mAuthorization;
}




--
Seth Willits


_______________________________________________

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

  • Prev by Date: Re: How does Finder determine when a file is busy being written to the disk?
  • Next by Date: Re: Character Map
  • Previous by thread: Re: How does Finder determine when a file is busy being written to the disk?
  • Next by thread: Reordered columns and [tableView editColumn:0 row:ind withEvent:nil select:YES];
  • Index(es):
    • Date
    • Thread