1 /* Copyright (c) 2012-2013 Apple Inc. All Rights Reserved. */
3 #ifndef _AUTHD_PRIVATE_H_
4 #define _AUTHD_PRIVATE_H_
8 #if defined(__cplusplus)
12 #define AUTH_NONNULL1 __attribute__((__nonnull__(1)))
13 #define AUTH_NONNULL2 __attribute__((__nonnull__(2)))
14 #define AUTH_NONNULL3 __attribute__((__nonnull__(3)))
15 #define AUTH_NONNULL4 __attribute__((__nonnull__(4)))
16 #define AUTH_NONNULL5 __attribute__((__nonnull__(5)))
17 #define AUTH_NONNULL6 __attribute__((__nonnull__(6)))
18 #define AUTH_NONNULL7 __attribute__((__nonnull__(7)))
19 #define AUTH_NONNULL_ALL __attribute__((__nonnull__))
20 #define AUTH_MALLOC __attribute__((__malloc__))
21 #define AUTH_UNUSED __attribute__((unused))
22 #define AUTH_WARN_RESULT __attribute__((__warn_unused_result__))
23 #define AUTH_INLINE static __inline__ __attribute__((__always_inline__))
25 #if __has_feature(attribute_cf_returns_retained)
26 #define AUTH_RETURNS_RETAINED __attribute__((cf_returns_retained))
28 #define AUTH_RETURNS_RETAINED
31 #if __has_feature(attribute_cf_returns_not_retained)
32 #define AUTH_RETURNS_NOT_RETAINED __attribute__((cf_returns_not_retained))
34 #define AUTH_RETURNS_NOT_RETAINED
37 #if __has_feature(attribute_cf_consumed)
38 #define AUTH_CONSUMED __attribute__((cf_consumed))
43 #define SECURITY_AUTH_NAME "com.apple.authd"
45 #define AUTH_XPC_TYPE "_type"
46 #define AUTH_XPC_RIGHTS "_rights"
47 #define AUTH_XPC_ENVIRONMENT "_environment"
48 #define AUTH_XPC_FLAGS "_flags"
49 #define AUTH_XPC_BLOB "_blob"
50 #define AUTH_XPC_STATUS "_status"
51 #define AUTH_XPC_RIGHT_NAME "_right_name"
52 #define AUTH_XPC_TAG "_tag"
53 #define AUTH_XPC_OUT_ITEMS "_out_items"
54 #define AUTH_XPC_EXTERNAL "_external"
55 #define AUTH_XPC_DATA "_data"
56 #define AUTH_XPC_BOOTSTRAP "_bootstrap"
58 #define AUTH_XPC_ITEM_NAME "_item_name"
59 #define AUTH_XPC_ITEM_FLAGS "_item_flags"
60 #define AUTH_XPC_ITEM_VALUE "_item_value"
61 #define AUTH_XPC_ITEM_TYPE "_item_type"
62 #define AUTH_XPC_ITEM_SENSITIVE_VALUE_LENGTH "_item_sensitive_value_length"
64 #define AUTH_XPC_REQUEST_METHOD_KEY "_agent_request_key"
65 #define AUTH_XPC_REQUEST_METHOD_CREATE "_agent_request_create"
66 #define AUTH_XPC_REQUEST_METHOD_INVOKE "_agent_request_invoke"
67 #define AUTH_XPC_REQUEST_METHOD_DEACTIVATE "_agent_request_deactivate"
68 #define AUTH_XPC_REQUEST_METHOD_DESTROY "_agent_request_destroy"
69 #define AUTH_XPC_REQUEST_METHOD_INTERRUPT "_agent_request_interrupt"
70 #define AUTH_XPC_REPLY_METHOD_KEY "_agent_reply_key"
71 #define AUTH_XPC_REPLY_METHOD_RESULT "_agent_reply_result"
72 #define AUTH_XPC_REPLY_METHOD_INTERRUPT "_agent_reply_interrupt"
73 #define AUTH_XPC_REPLY_METHOD_CREATE "_agent_reply_create"
74 #define AUTH_XPC_REPLY_METHOD_DEACTIVATE "_agent_reply_deactivate"
75 #define AUTH_XPC_PLUGIN_NAME "_agent_plugin"
76 #define AUTH_XPC_MECHANISM_NAME "_agent_mechanism"
77 #define AUTH_XPC_HINTS_NAME "_agent_hints"
78 #define AUTH_XPC_CONTEXT_NAME "_agent_context"
79 #define AUTH_XPC_IMMUTABLE_HINTS_NAME "_agent_immutable_hints"
80 #define AUTH_XPC_REPLY_RESULT_VALUE "_agent_reply_result_value"
81 #define AUTH_XPC_AUDIT_SESSION_PORT "_agent_audit_session_port"
82 #define AUTH_XPC_BOOTSTRAP_PORT "_agent_bootstrap_port"
84 typedef struct AuthorizationBlob
{
88 typedef struct AuthorizationExternalBlob
{
89 AuthorizationBlob blob
;
91 } AuthorizationExternalBlob
;
94 AUTHORIZATION_CREATE
= 1,
96 AUTHORIZATION_COPY_RIGHTS
,
97 AUTHORIZATION_COPY_INFO
,
98 AUTHORIZATION_MAKE_EXTERNAL_FORM
,
99 AUTHORIZATION_CREATE_FROM_EXTERNAL_FORM
,
100 AUTHORIZATION_RIGHT_GET
,
101 AUTHORIZATION_RIGHT_SET
,
102 AUTHORIZATION_RIGHT_REMOVE
,
103 SESSION_SET_USER_PREFERENCES
,
105 AUTHORIZATION_CREATE_WITH_AUDIT_TOKEN
,
106 AUTHORIZATION_DISMISS
,
108 AUTHORIZATION_ENABLE_SMARTCARD
111 #if defined(__cplusplus)
115 #endif /* !_AUTHD_PRIVATE_H_ */