1 /* Copyright (c) 2012 Apple Inc. All Rights Reserved. */
3 #ifndef _SECURITY_AUTH_SESSION_H_
4 #define _SECURITY_AUTH_SESSION_H_
6 #include "credential.h"
7 #include <Security/AuthSession.h>
8 #include <bsm/audit_session.h>
10 #if defined(__cplusplus)
14 AUTH_WARN_RESULT AUTH_MALLOC AUTH_NONNULL_ALL AUTH_RETURNS_RETAINED
15 session_t
session_create(session_id_t
);
18 bool session_update(session_t
);
21 uint64_t session_get_attributes(session_t
);
24 void session_set_attributes(session_t
,uint64_t flags
);
27 void session_clear_attributes(session_t
,uint64_t flags
);
30 const void * session_get_key(session_t
);
33 session_id_t
session_get_id(session_t
);
36 uid_t
session_get_uid(session_t
);
39 CFIndex
session_add_process(session_t
, process_t
);
42 CFIndex
session_remove_process(session_t
, process_t
);
45 CFIndex
session_get_process_count(session_t
);
48 void session_set_credential(session_t
,credential_t
);
51 void session_credentials_purge(session_t
);
54 bool session_credentials_iterate(session_t
, credential_iterator_t iter
);
56 #if defined(__cplusplus)
60 #endif /* !_SECURITY_AUTH_SESSION_H_ */