Re: AuthorizationRightSet unexpectedly fails on os x 10.9 DP1; authd logs strange error
Re: AuthorizationRightSet unexpectedly fails on os x 10.9 DP1; authd logs strange error
- Subject: Re: AuthorizationRightSet unexpectedly fails on os x 10.9 DP1; authd logs strange error
- From: Eli Bach <email@hidden>
- Date: Sun, 04 Aug 2013 12:02:26 -0600
Michael,
This is a public mailing list, and as such, you shouldn't be discussing super-secret prerelease software on it. Normally, you want to post these questions on Apple's developer forums, but I'm not sure if they are up right now. If not, and you still want help, maybe burn a tech support incident.
Eli
On 2013-07-23, at 8:32 PM, Michael Ritter <email@hidden> wrote:
> Our preflight installer script needs to add an authorization right. This
> worked on OS X 10.4-10.8 but suddenly stopped working on OS X 10.9 DP1.
> AuthorizationRightSet() fails with -60005 (errAuthorizationDenied), and the
> following error message is logged by authd:
> "Jul 20 07:20:15 Testers-Mac.local com.apple.authd[66]: server[584]:
> AuthorizationRightSet Denied process identifier not found, missing code
> signature."
>
> Our installer runs as superuser. Executing the below code from a command
> line program by root fails in the same manner.
>
> Here's the source code:
>
> int SetAuthRight()
> {
> OSStatus status;
> AuthorizationRef auth;
>
> status=AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment,
> kAuthorizationFlagDefaults, &auth);
> if(status!=noErr){
> syslog(LOG_ERR, "AuthorizationCreate failed: %d.", (int)status);
> return -1;
> }
> status=AuthorizationRightSet(auth, "mycompany.myapp.auth",
> CFSTR(kAuthorizationRuleAuthenticateAsAdmin), CFSTR("my_display_message"),
> NULL, NULL);
> AuthorizationFree(auth, kAuthorizationFlagDefaults);
> if(status!=noErr){
> syslog(LOG_ERR, "AuthorizationRightSet failed: %d.", (int)status);
> return -1;
> }
> return 0;
> }
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden