Function

AuthorizationCopyPrivilegedReference

Retrieves the authorization reference passed by the AuthorizationExecuteWithPrivileges function.

Declaration

OSStatus AuthorizationCopyPrivilegedReference(AuthorizationRef  _Nullable *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

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.

See Also

Executing with Root Privileges

AuthorizationExecuteWithPrivileges

Runs an executable tool with root privileges.

Deprecated