Re: How do you use AuthorizationRuleIsAdmin?
Re: How do you use AuthorizationRuleIsAdmin?
- Subject: Re: How do you use AuthorizationRuleIsAdmin?
- From: Nick Zitzmann <email@hidden>
- Date: Wed, 27 Jul 2005 07:12:34 -0600
On Jul 27, 2005, at 12:51 AM, BK wrote:
How do I initialise an authorisation reference that I can pass to
AuthorizationExecuteWithPrivileges (to tell the daemon to restart)
such that it only executes if the user has authenticated himself as
an admin user?
Call AuthorizationCopyRights() to pre-authorize the user. If the
function returns errAuthorizationCanceled, errAuthorizationDenied, or
most errors other than errAuthorizationSuccess, then you should stop
there and not call AEWP(). You can also call AEWP() without pre-
authorizing, but the authorization period won't last beyond the call
to AEWP(), and Mac OS X 10.[01] users are presented an ugly dialog
with a password request from "AuthorizationTrampoline".
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden