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 const char * process_get_code_url(process_t
); 
  45 CFIndex 
process_add_connection(process_t
, connection_t
); 
  48 CFIndex 
process_remove_connection(process_t
, connection_t
); 
  51 CFIndex 
process_get_connection_count(process_t
); 
  54 void process_add_auth_token(process_t
, auth_token_t
); 
  57 void process_remove_auth_token(process_t
, auth_token_t
, uint32_t flags
); 
  60 auth_token_t 
process_find_copy_auth_token(process_t
, const AuthorizationBlob
*); 
  63 CFIndex 
process_get_auth_token_count(process_t
); 
  66 CFTypeRef 
process_copy_entitlement_value(process_t
, const char * entitlement
); 
  69 bool process_has_entitlement(process_t
, const char * entitlement
); 
  72 bool process_has_entitlement_for_right(process_t
, const char * right
); 
  75 const char * process_get_identifier(process_t
); 
  78 CFDataRef 
process_get_requirement_data(process_t
); 
  81 SecRequirementRef 
process_get_requirement(process_t
); 
  84 bool process_verify_requirement(process_t
, SecCodeRef
, SecRequirementRef
); 
  87 bool process_apple_signed(process_t proc
); 
  90 bool process_firstparty_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_ */