1 /* Copyright (c) 2012-2013 Apple Inc. All Rights Reserved. */
3 #ifndef _SECURITY_AUTH_PROCESS_H_
4 #define _SECURITY_AUTH_PROCESS_H_
6 #include <CoreFoundation/CoreFoundation.h>
7 #include <Security/SecCode.h>
10 #if defined(__cplusplus)
14 AUTH_WARN_RESULT AUTH_MALLOC AUTH_NONNULL_ALL AUTH_RETURNS_RETAINED
15 process_t
process_create(const audit_info_s
*,session_t
);
18 const void * process_get_key(process_t
);
21 uid_t
process_get_uid(process_t
);
24 pid_t
process_get_pid(process_t
);
27 int32_t process_get_generation(process_t
);
30 session_id_t
process_get_session_id(process_t
);
33 session_t
process_get_session(process_t
);
36 uint32_t process_get_count(process_t
);
39 const audit_info_s
* process_get_audit_info(process_t
);
42 SecCodeRef
process_get_code(process_t
);
45 const char * process_get_code_url(process_t
);
48 CFIndex
process_add_connection(process_t
, connection_t
);
51 CFIndex
process_remove_connection(process_t
, connection_t
);
54 CFIndex
process_get_connection_count(process_t
);
57 void process_add_auth_token(process_t
,auth_token_t
);
60 void process_remove_auth_token(process_t
,auth_token_t
, uint32_t flags
);
63 auth_token_t
process_find_copy_auth_token(process_t
,const AuthorizationBlob
*);
66 CFIndex
process_get_auth_token_count(process_t
);
69 CFTypeRef
process_copy_entitlement_value(process_t
, const char * entitlement
);
72 bool process_has_entitlement(process_t
, const char * entitlement
);
75 bool process_has_entitlement_for_right(process_t
, const char * right
);
78 const char * process_get_identifier(process_t
);
81 CFDataRef
process_get_requirement_data(process_t
);
84 SecRequirementRef
process_get_requirement(process_t
);
87 bool process_verify_requirment(process_t
,SecRequirementRef
);
90 bool process_apple_signed(process_t proc
);
93 mach_port_t
process_get_bootstrap(process_t
);
96 bool process_set_bootstrap(process_t
, mach_port_t
);
98 #if defined(__cplusplus)
102 #endif /* !_SECURITY_AUTH_PROCESS_H_ */