objc2_security/generated/Authorization.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::cell::UnsafeCell;
4use core::ffi::*;
5use core::marker::{PhantomData, PhantomPinned};
6use core::ptr::NonNull;
7#[cfg(feature = "objc2")]
8use objc2::__framework_prelude::*;
9
10use crate::*;
11
12/// [Apple's documentation](https://developer.apple.com/documentation/security/errauthorizationsuccess?language=objc)
13pub const errAuthorizationSuccess: OSStatus = 0;
14/// [Apple's documentation](https://developer.apple.com/documentation/security/errauthorizationinvalidset?language=objc)
15pub const errAuthorizationInvalidSet: OSStatus = -60001;
16/// [Apple's documentation](https://developer.apple.com/documentation/security/errauthorizationinvalidref?language=objc)
17pub const errAuthorizationInvalidRef: OSStatus = -60002;
18/// [Apple's documentation](https://developer.apple.com/documentation/security/errauthorizationinvalidtag?language=objc)
19pub const errAuthorizationInvalidTag: OSStatus = -60003;
20/// [Apple's documentation](https://developer.apple.com/documentation/security/errauthorizationinvalidpointer?language=objc)
21pub const errAuthorizationInvalidPointer: OSStatus = -60004;
22/// [Apple's documentation](https://developer.apple.com/documentation/security/errauthorizationdenied?language=objc)
23pub const errAuthorizationDenied: OSStatus = -60005;
24/// [Apple's documentation](https://developer.apple.com/documentation/security/errauthorizationcanceled?language=objc)
25pub const errAuthorizationCanceled: OSStatus = -60006;
26/// [Apple's documentation](https://developer.apple.com/documentation/security/errauthorizationinteractionnotallowed?language=objc)
27pub const errAuthorizationInteractionNotAllowed: OSStatus = -60007;
28/// [Apple's documentation](https://developer.apple.com/documentation/security/errauthorizationinternal?language=objc)
29pub const errAuthorizationInternal: OSStatus = -60008;
30/// [Apple's documentation](https://developer.apple.com/documentation/security/errauthorizationexternalizenotallowed?language=objc)
31pub const errAuthorizationExternalizeNotAllowed: OSStatus = -60009;
32/// [Apple's documentation](https://developer.apple.com/documentation/security/errauthorizationinternalizenotallowed?language=objc)
33pub const errAuthorizationInternalizeNotAllowed: OSStatus = -60010;
34/// [Apple's documentation](https://developer.apple.com/documentation/security/errauthorizationinvalidflags?language=objc)
35pub const errAuthorizationInvalidFlags: OSStatus = -60011;
36/// [Apple's documentation](https://developer.apple.com/documentation/security/errauthorizationtoolexecutefailure?language=objc)
37pub const errAuthorizationToolExecuteFailure: OSStatus = -60031;
38/// [Apple's documentation](https://developer.apple.com/documentation/security/errauthorizationtoolenvironmenterror?language=objc)
39pub const errAuthorizationToolEnvironmentError: OSStatus = -60032;
40/// [Apple's documentation](https://developer.apple.com/documentation/security/errauthorizationbadaddress?language=objc)
41pub const errAuthorizationBadAddress: OSStatus = -60033;
42
43/// Optional flags passed in to several Authorization APIs.
44/// See the description of AuthorizationCreate, AuthorizationCopyRights and AuthorizationFree for a description of how they affect those calls.
45///
46/// See also [Apple's documentation](https://developer.apple.com/documentation/security/authorizationflags?language=objc)
47// NS_OPTIONS
48#[repr(transparent)]
49#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
50pub struct AuthorizationFlags(pub u32);
51bitflags::bitflags! {
52 impl AuthorizationFlags: u32 {
53 #[doc(alias = "kAuthorizationFlagDefaults")]
54 const Defaults = 0;
55 #[doc(alias = "kAuthorizationFlagInteractionAllowed")]
56 const InteractionAllowed = 1<<0;
57 #[doc(alias = "kAuthorizationFlagExtendRights")]
58 const ExtendRights = 1<<1;
59 #[doc(alias = "kAuthorizationFlagPartialRights")]
60 const PartialRights = 1<<2;
61 #[doc(alias = "kAuthorizationFlagDestroyRights")]
62 const DestroyRights = 1<<3;
63 #[doc(alias = "kAuthorizationFlagPreAuthorize")]
64 const PreAuthorize = 1<<4;
65 #[doc(alias = "kAuthorizationFlagSkipInternalAuth")]
66 const SkipInternalAuth = 1<<9;
67 #[doc(alias = "kAuthorizationFlagNoData")]
68 const NoData = 1<<20;
69 }
70}
71
72#[cfg(feature = "objc2")]
73unsafe impl Encode for AuthorizationFlags {
74 const ENCODING: Encoding = u32::ENCODING;
75}
76
77#[cfg(feature = "objc2")]
78unsafe impl RefEncode for AuthorizationFlags {
79 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
80}
81
82/// [Apple's documentation](https://developer.apple.com/documentation/security/kauthorizationflagcannotpreauthorize?language=objc)
83pub const kAuthorizationFlagCanNotPreAuthorize: c_uint = 1;
84
85/// [Apple's documentation](https://developer.apple.com/documentation/security/authorizationopaqueref?language=objc)
86#[repr(C)]
87#[derive(Debug)]
88pub struct AuthorizationOpaqueRef {
89 inner: [u8; 0],
90 _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
91}
92
93#[cfg(feature = "objc2")]
94unsafe impl RefEncode for AuthorizationOpaqueRef {
95 const ENCODING_REF: Encoding =
96 Encoding::Pointer(&Encoding::Struct("AuthorizationOpaqueRef", &[]));
97}
98
99/// Opaque reference to an authorization object.
100///
101/// See also [Apple's documentation](https://developer.apple.com/documentation/security/authorizationref?language=objc)
102pub type AuthorizationRef = *const AuthorizationOpaqueRef;
103
104/// A zero terminated string in UTF-8 encoding.
105///
106/// See also [Apple's documentation](https://developer.apple.com/documentation/security/authorizationstring?language=objc)
107pub type AuthorizationString = *const c_char;
108
109/// Each AuthorizationItem describes a single string-named item with optional
110/// parameter value. The value must be contiguous memory of valueLength bytes;
111/// internal structure is defined separately for each name.
112///
113/// Field: name name of the item, as an AuthorizationString. Mandatory.
114/// Field: valueLength Number of bytes in parameter value. Must be 0 if no parameter value.
115/// Field: value Pointer to the optional parameter value associated with name.
116/// Must be NULL if no parameter value.
117/// Field: flags Reserved field. Must be set to 0 on creation. Do not modify after that.
118///
119/// See also [Apple's documentation](https://developer.apple.com/documentation/security/authorizationitem?language=objc)
120#[repr(C)]
121#[derive(Clone, Copy, Debug, PartialEq)]
122pub struct AuthorizationItem {
123 pub name: AuthorizationString,
124 pub valueLength: usize,
125 pub value: *mut c_void,
126 pub flags: u32,
127}
128
129#[cfg(feature = "objc2")]
130unsafe impl Encode for AuthorizationItem {
131 const ENCODING: Encoding = Encoding::Struct(
132 "?",
133 &[
134 <AuthorizationString>::ENCODING,
135 <usize>::ENCODING,
136 <*mut c_void>::ENCODING,
137 <u32>::ENCODING,
138 ],
139 );
140}
141
142#[cfg(feature = "objc2")]
143unsafe impl RefEncode for AuthorizationItem {
144 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
145}
146
147/// An AuthorizationItemSet structure represents a set of zero or more AuthorizationItems. Since it is a set it should not contain any identical AuthorizationItems.
148///
149/// Field: count Number of items identified by items.
150/// Field: items Pointer to an array of items.
151///
152/// See also [Apple's documentation](https://developer.apple.com/documentation/security/authorizationitemset?language=objc)
153#[repr(C)]
154#[derive(Clone, Copy, Debug, PartialEq)]
155pub struct AuthorizationItemSet {
156 pub count: u32,
157 pub items: *mut AuthorizationItem,
158}
159
160#[cfg(feature = "objc2")]
161unsafe impl Encode for AuthorizationItemSet {
162 const ENCODING: Encoding =
163 Encoding::Struct("?", &[<u32>::ENCODING, <*mut AuthorizationItem>::ENCODING]);
164}
165
166#[cfg(feature = "objc2")]
167unsafe impl RefEncode for AuthorizationItemSet {
168 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
169}
170
171/// An AuthorizationExternalForm structure can hold the externalized form of
172/// an AuthorizationRef. As such, it can be transmitted across IPC channels
173/// to other processes, which can re-internalize it to recover a valid AuthorizationRef
174/// handle.
175/// The data contained in an AuthorizationExternalForm should be considered opaque.
176///
177/// SECURITY NOTE: Applications should take care to not disclose the AuthorizationExternalForm to
178/// potential attackers since it would authorize rights to them.
179///
180/// See also [Apple's documentation](https://developer.apple.com/documentation/security/authorizationexternalform?language=objc)
181#[repr(C)]
182#[derive(Clone, Copy, Debug, PartialEq)]
183pub struct AuthorizationExternalForm {
184 pub bytes: [c_char; 32],
185}
186
187#[cfg(feature = "objc2")]
188unsafe impl Encode for AuthorizationExternalForm {
189 const ENCODING: Encoding = Encoding::Struct("?", &[<[c_char; 32]>::ENCODING]);
190}
191
192#[cfg(feature = "objc2")]
193unsafe impl RefEncode for AuthorizationExternalForm {
194 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
195}
196
197/// An AuthorizationItemSet representing a set of rights each with an associated argument (value).
198/// Each argument value is as defined for the specific right they belong to. Argument values may not contain pointers as the should be copyable to different address spaces.
199///
200/// See also [Apple's documentation](https://developer.apple.com/documentation/security/authorizationrights?language=objc)
201pub type AuthorizationRights = AuthorizationItemSet;
202
203/// An AuthorizationItemSet representing environmental information of potential use
204/// to authorization decisions.
205///
206/// See also [Apple's documentation](https://developer.apple.com/documentation/security/authorizationenvironment?language=objc)
207pub type AuthorizationEnvironment = AuthorizationItemSet;
208
209extern "C-unwind" {
210 /// Create a new autorization object which can be used in other authorization calls. When the authorization is no longer needed AuthorizationFree should be called.
211 ///
212 /// When the kAuthorizationFlagInteractionAllowed flag is set, user interaction will happen when required. Failing to set this flag will result in this call failing with a errAuthorizationInteractionNotAllowed status when interaction is required.
213 ///
214 /// Setting the kAuthorizationFlagExtendRights flag will extend the currently available rights. If this flag is set the returned AuthorizationRef will grant all the rights requested when errAuthorizationSuccess is returned. If this flag is not set the operation will almost certainly succeed, but no attempt will be made to make the requested rights availible.
215 /// Call AuthorizationCopyRights to figure out which of the requested rights are granted by the returned AuthorizationRef.
216 ///
217 /// Setting the kAuthorizationFlagPartialRights flag will cause this call to succeed if only some of the requested rights are being granted by the returned AuthorizationRef. Unless this flag is set this API will fail if not all the requested rights could be obtained.
218 ///
219 /// Setting the kAuthorizationFlagDestroyRights flag will prevent any rights obtained during this call from being preserved after returning from this API (This is most useful when the authorization parameter is NULL and the caller doesn't want to affect the session state in any way).
220 ///
221 /// Setting the kAuthorizationFlagPreAuthorize flag will pre authorize the requested rights so that at a later time -- by calling AuthorizationMakeExternalForm() follow by AuthorizationCreateFromExternalForm() -- the obtained rights can be used in a different process. Rights that can't be preauthorized will be treated as if they were authorized for the sake of returning an error (in other words if all rights are either authorized or could not be preauthorized this call will still succeed).
222 /// The rights which could not be preauthorized are not currently authorized and may fail to authorize when a later call to AuthorizationCopyRights() is made, unless the kAuthorizationFlagExtendRights and kAuthorizationFlagInteractionAllowed flags are set. Even then they might still fail if the user does not supply the correct credentials.
223 /// The reason for passing in this flag is to provide correct audit trail information and to avoid unnecessary user interaction.
224 ///
225 ///
226 /// Parameter `rights`: (input/optional) An AuthorizationItemSet containing rights for which authorization is being requested. If none are specified the resulting AuthorizationRef will authorize nothing at all.
227 ///
228 /// Parameter `environment`: (input/optional) An AuthorizationItemSet containing environment state used when making the autorization decision. See the AuthorizationEnvironment type for details.
229 ///
230 /// Parameter `flags`: (input) options specified by the AuthorizationFlags enum. set all unused bits to zero to allow for future expansion.
231 ///
232 /// Parameter `authorization`: (output optional) A pointer to an AuthorizationRef to be returned. When the returned AuthorizationRef is no longer needed AuthorizationFree should be called to prevent anyone from using the acquired rights. If NULL is specified no new rights are returned, but the system will attempt to authorize all the requested rights and return the appropriate status.
233 ///
234 ///
235 /// Returns: errAuthorizationSuccess 0 authorization or all requested rights succeeded.
236 ///
237 /// errAuthorizationDenied -60005 The authorization for one or more of the requested rights was denied.
238 ///
239 /// errAuthorizationCanceled -60006 The authorization was canceled by the user.
240 ///
241 /// errAuthorizationInteractionNotAllowed -60007 The authorization was denied since no interaction with the user was allowed.
242 pub fn AuthorizationCreate(
243 rights: *const AuthorizationRights,
244 environment: *const AuthorizationEnvironment,
245 flags: AuthorizationFlags,
246 authorization: *mut AuthorizationRef,
247 ) -> OSStatus;
248}
249
250extern "C-unwind" {
251 /// Destroy an AutorizationRef object. If the kAuthorizationFlagDestroyRights flag is passed,
252 /// any rights associated with the authorization are lost. Otherwise, only local resources
253 /// are released, and the rights may still be available to other clients.
254 ///
255 /// Setting the kAuthorizationFlagDestroyRights flag will prevent any rights that were obtained by the specified authorization object to be preserved after returning from this API. This effectivaly locks down all potentially shared authorizations.
256 ///
257 ///
258 /// Parameter `authorization`: (input) The authorization object on which this operation is performed.
259 ///
260 ///
261 /// Parameter `flags`: (input) Bit mask of option flags to this call.
262 ///
263 ///
264 /// Returns: errAuthorizationSuccess 0 No error.
265 ///
266 /// errAuthorizationInvalidRef -60002 The authorization parameter is invalid.
267 pub fn AuthorizationFree(
268 authorization: AuthorizationRef,
269 flags: AuthorizationFlags,
270 ) -> OSStatus;
271}
272
273extern "C-unwind" {
274 /// Given a set of rights, return the subset that is currently authorized
275 /// by the AuthorizationRef given.
276 ///
277 /// When the kAuthorizationFlagInteractionAllowed flag is set, user interaction will happen when required. Failing to set this flag will result in this call failing with a errAuthorizationInteractionNotAllowed status when interaction is required.
278 ///
279 /// Setting the kAuthorizationFlagExtendRights flag will extend the currently available rights.
280 ///
281 /// Setting the kAuthorizationFlagPartialRights flag will cause this call to succeed if only some of the requested rights are being granted by the returned AuthorizationRef. Unless this flag is set this API will fail if not all the requested rights could be obtained.
282 ///
283 /// Setting the kAuthorizationFlagDestroyRights flag will prevent any additional rights obtained during this call from being preserved after returning from this API.
284 ///
285 /// Setting the kAuthorizationFlagPreAuthorize flag will pre authorize the requested rights so that at a later time -- by calling AuthorizationMakeExternalForm() follow by AuthorizationCreateFromExternalForm() -- the obtained rights can be used in a different process. Rights that can't be preauthorized will be treated as if they were authorized for the sake of returning an error (in other words if all rights are either authorized or could not be preauthorized this call will still succeed), and they will be returned in authorizedRights with their kAuthorizationFlagCanNotPreAuthorize bit in the flags field set to 1.
286 /// The rights which could not be preauthorized are not currently authorized and may fail to authorize when a later call to AuthorizationCopyRights() is made, unless the kAuthorizationFlagExtendRights and kAuthorizationFlagInteractionAllowed flags are set. Even then they might still fail if the user does not supply the correct credentials.
287 /// The reason for passing in this flag is to provide correct audit trail information and to avoid unnecessary user interaction.
288 ///
289 ///
290 /// Parameter `authorization`: (input) The authorization object on which this operation is performed.
291 ///
292 /// Parameter `rights`: (input) A rights set (see AuthorizationCreate).
293 ///
294 /// Parameter `environment`: (input/optional) An AuthorizationItemSet containing environment state used when making the autorization decision. See the AuthorizationEnvironment type for details.
295 ///
296 /// Parameter `flags`: (input) options specified by the AuthorizationFlags enum. set all unused bits to zero to allow for future expansion.
297 ///
298 /// Parameter `authorizedRights`: (output/optional) A pointer to a newly allocated AuthorizationInfoSet in which the authorized subset of rights are returned (authorizedRights should be deallocated by calling AuthorizationFreeItemSet() when it is no longer needed). If NULL the only information returned is the status. Note that if the kAuthorizationFlagPreAuthorize flag was specified rights that could not be preauthorized are returned in authorizedRights, but their flags contains the kAuthorizationFlagCanNotPreAuthorize bit.
299 ///
300 ///
301 /// Returns: errAuthorizationSuccess 0 No error.
302 ///
303 /// errAuthorizationInvalidRef -60002 The authorization parameter is invalid.
304 ///
305 /// errAuthorizationInvalidSet -60001 The rights parameter is invalid.
306 ///
307 /// errAuthorizationInvalidPointer -60004 The authorizedRights parameter is invalid.
308 pub fn AuthorizationCopyRights(
309 authorization: AuthorizationRef,
310 rights: NonNull<AuthorizationRights>,
311 environment: *const AuthorizationEnvironment,
312 flags: AuthorizationFlags,
313 authorized_rights: *mut *mut AuthorizationRights,
314 ) -> OSStatus;
315}
316
317/// Callback block passed to AuthorizationCopyRightsAsync.
318///
319///
320/// Parameter `err`: (output) The result of the AuthorizationCopyRights call.
321///
322/// Parameter `blockAuthorizedRights`: (output) The authorizedRights from the AuthorizationCopyRights call to be deallocated by calling AuthorizationFreeItemSet() when it is no longer needed.
323///
324/// See also [Apple's documentation](https://developer.apple.com/documentation/security/authorizationasynccallback?language=objc)
325#[cfg(feature = "block2")]
326pub type AuthorizationAsyncCallback =
327 *mut block2::Block<dyn Fn(OSStatus, *mut AuthorizationRights)>;
328
329extern "C-unwind" {
330 /// An asynchronous version of AuthorizationCopyRights.
331 ///
332 ///
333 /// Parameter `callbackBlock`: (input) The callback block to be called upon completion.
334 #[cfg(feature = "block2")]
335 pub fn AuthorizationCopyRightsAsync(
336 authorization: AuthorizationRef,
337 rights: NonNull<AuthorizationRights>,
338 environment: *const AuthorizationEnvironment,
339 flags: AuthorizationFlags,
340 callback_block: AuthorizationAsyncCallback,
341 );
342}
343
344extern "C-unwind" {
345 /// Returns sideband information (e.g. access credentials) obtained from a call to AuthorizationCreate. The format of this data depends of the tag specified.
346 ///
347 ///
348 /// Parameter `authorization`: (input) The authorization object on which this operation is performed.
349 ///
350 /// Parameter `tag`: (input/optional) An optional string tag specifing which sideband information should be returned. When NULL is specified all available information is returned.
351 ///
352 /// Parameter `info`: (output) A pointer to a newly allocated AuthorizationInfoSet in which the requested sideband infomation is returned (info should be deallocated by calling AuthorizationFreeItemSet() when it is no longer needed).
353 ///
354 ///
355 /// Returns: errAuthorizationSuccess 0 No error.
356 ///
357 /// errAuthorizationInvalidRef -60002 The authorization parameter is invalid.
358 ///
359 /// errAuthorizationInvalidTag -60003 The tag parameter is invalid.
360 ///
361 /// errAuthorizationInvalidPointer -60004 The info parameter is invalid.
362 pub fn AuthorizationCopyInfo(
363 authorization: AuthorizationRef,
364 tag: AuthorizationString,
365 info: NonNull<*mut AuthorizationItemSet>,
366 ) -> OSStatus;
367}
368
369extern "C-unwind" {
370 /// Turn an Authorization into an external "byte blob" form so it can be
371 /// transmitted to another process.
372 /// Note that *storing* the external form somewhere will probably not do what
373 /// you want, since authorizations are bounded by sessions, processes, and possibly
374 /// time limits. This is for online transmission of authorizations.
375 ///
376 ///
377 /// Parameter `authorization`: The (valid) authorization reference to externalize
378 ///
379 /// Parameter `extForm`: Pointer to an AuthorizationExternalForm variable to fill.
380 ///
381 ///
382 /// Returns: errAuthorizationSuccess 0 No error.
383 ///
384 /// errAuthorizationExternalizeNotAllowed -60009 Externalizing this authorization is not allowed.
385 ///
386 /// errAuthorizationInvalidRef -60002 The authorization parameter is invalid.
387 pub fn AuthorizationMakeExternalForm(
388 authorization: AuthorizationRef,
389 ext_form: NonNull<AuthorizationExternalForm>,
390 ) -> OSStatus;
391}
392
393extern "C-unwind" {
394 /// Internalize the external "byte blob" form of an authorization reference.
395 ///
396 ///
397 /// Parameter `extForm`: Pointer to an AuthorizationExternalForm value.
398 ///
399 /// Parameter `authorization`: Will be filled with a valid AuthorizationRef on success.
400 ///
401 ///
402 /// Returns: errAuthorizationInternalizeNotAllowed -60010 Internalizing this authorization is not allowed.
403 pub fn AuthorizationCreateFromExternalForm(
404 ext_form: NonNull<AuthorizationExternalForm>,
405 authorization: NonNull<AuthorizationRef>,
406 ) -> OSStatus;
407}
408
409extern "C-unwind" {
410 /// Release the memory allocated for an AuthorizationItemSet that was allocated
411 /// by an API call.
412 ///
413 ///
414 /// Parameter `set`: The AuthorizationItemSet to deallocate.
415 ///
416 ///
417 /// Returns: errAuthorizationSuccess 0 No error.
418 ///
419 /// errAuthorizationInvalidSet -60001 The set parameter is invalid.
420 pub fn AuthorizationFreeItemSet(set: NonNull<AuthorizationItemSet>) -> OSStatus;
421}
422
423extern "C-unwind" {
424 /// Run an executable tool with enhanced privileges after passing
425 /// suitable authorization procedures.
426 ///
427 ///
428 /// Parameter `authorization`: An authorization reference that is used to authorize
429 /// access to the enhanced privileges. It is also passed to the tool for
430 /// further access control.
431 ///
432 /// Parameter `pathToTool`: Full pathname to the tool that should be executed
433 /// with enhanced privileges.
434 ///
435 /// Parameter `options`: Option bits (reserved). Must be zero.
436 ///
437 /// Parameter `arguments`: An argv-style vector of strings to be passed to the tool.
438 ///
439 /// Parameter `communicationsPipe`: Assigned a UNIX stdio FILE pointer for
440 /// a bidirectional pipe to communicate with the tool. The tool will have
441 /// this pipe as its standard I/O channels (stdin/stdout). If NULL, do not
442 /// establish a communications pipe.
443 ///
444 ///
445 /// This function has been deprecated and should no longer be used.
446 /// Use a launchd-launched helper tool and/or the Service Mangement framework
447 /// for this functionality.
448 #[cfg(feature = "libc")]
449 #[deprecated]
450 pub fn AuthorizationExecuteWithPrivileges(
451 authorization: AuthorizationRef,
452 path_to_tool: NonNull<c_char>,
453 options: AuthorizationFlags,
454 arguments: NonNull<NonNull<c_char>>,
455 communications_pipe: *mut *mut libc::FILE,
456 ) -> OSStatus;
457}
458
459extern "C-unwind" {
460 /// From within a tool launched via the AuthorizationExecuteWithPrivileges function
461 /// ONLY, retrieve the AuthorizationRef originally passed to that function.
462 /// While AuthorizationExecuteWithPrivileges already verified the authorization to
463 /// launch your tool, the tool may want to avail itself of any additional pre-authorizations
464 /// the caller may have obtained through that reference.
465 ///
466 ///
467 /// This function has been deprecated and should no longer be used.
468 /// Use a launchd-launched helper tool and/or the Service Mangement framework
469 /// for this functionality.
470 #[deprecated]
471 pub fn AuthorizationCopyPrivilegedReference(
472 authorization: NonNull<AuthorizationRef>,
473 flags: AuthorizationFlags,
474 ) -> OSStatus;
475}