AuthorizationCopyPrivilegedReference
Retrieves the authorization reference passed by the AuthorizationExecuteWithPrivileges function.
Declaration
OSStatus AuthorizationCopyPrivilegedReference(AuthorizationRef*authorization, AuthorizationFlags flags);Parameters
- authorization:
A pointer to an authorization reference. The Security Server allocates the authorization reference for you, so you do not need to call the function Authorizationcreate(_:_:_:_:). On return, it points to a copy of the authorization reference used in the call to the Authorizationexecutewithprivileges function.
- flags:
Reserved options. Pass the Kauthorizationflagdefaults constant.
Return Value
A result code. See Authorization Services Result Codes.
Discussion
This function retrieves the authorization reference you pass in the function AuthorizationExecuteWithPrivileges. The new process can use the authorization reference to verify authorizations obtained by the calling process.