SFAuthorization bug / crash
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