• 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
AuthorizationRightSet unexpectedly fails on os x 10.9 DP1; authd logs strange error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AuthorizationRightSet unexpectedly fails on os x 10.9 DP1; authd logs strange error


  • Subject: AuthorizationRightSet unexpectedly fails on os x 10.9 DP1; authd logs strange error
  • From: Michael Ritter <email@hidden>
  • Date: Wed, 24 Jul 2013 04:32:41 +0200

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;
}

Thanks in advance.

Michael Ritter



 _______________________________________________
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


  • Prev by Date: Regarding IOMedia init function...
  • Next by Date: Re: Regarding IOMedia init function...
  • Previous by thread: Re: Regarding IOMedia init function...
  • Index(es):
    • Date
    • Thread