AuthorizationCopyPrivilegedReference

Function AuthorizationCopyPrivilegedReference 

Source
pub unsafe extern "C-unwind" fn AuthorizationCopyPrivilegedReference(
    authorization: NonNull<AuthorizationRef>,
    flags: AuthorizationFlags,
) -> i32
๐Ÿ‘ŽDeprecated
Available on crate feature Authorization only.
Expand description

From within a tool launched via the AuthorizationExecuteWithPrivileges function ONLY, retrieve the AuthorizationRef originally passed to that function. While AuthorizationExecuteWithPrivileges already verified the authorization to launch your tool, the tool may want to avail itself of any additional pre-authorizations the caller may have obtained through that reference.

This function has been deprecated and should no longer be used. Use a launchd-launched helper tool and/or the Service Mangement framework for this functionality.

ยงSafety

authorization must be a valid pointer.