| 1 |
#ifndef _SEPOL_USERS_H_ |
| 2 |
#define _SEPOL_USERS_H_ |
| 3 |
|
| 4 |
#include <sepol/policydb.h> |
| 5 |
#include <sepol/user_record.h> |
| 6 |
#include <sepol/handle.h> |
| 7 |
#include <stddef.h> |
| 8 |
|
| 9 |
#ifdef __cplusplus |
| 10 |
extern "C" { |
| 11 |
#endif |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
extern int sepol_genusers(void *data, size_t len, |
| 20 |
const char *usersdir, |
| 21 |
void **newdata, size_t * newlen); |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
extern void sepol_set_delusers(int on); |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
extern int sepol_user_modify(sepol_handle_t * handle, |
| 32 |
sepol_policydb_t * policydb, |
| 33 |
const sepol_user_key_t * key, |
| 34 |
const sepol_user_t * data); |
| 35 |
|
| 36 |
|
| 37 |
extern int sepol_user_count(sepol_handle_t * handle, |
| 38 |
const sepol_policydb_t * p, unsigned int *response); |
| 39 |
|
| 40 |
|
| 41 |
extern int sepol_user_exists(sepol_handle_t * handle, |
| 42 |
const sepol_policydb_t * policydb, |
| 43 |
const sepol_user_key_t * key, int *response); |
| 44 |
|
| 45 |
|
| 46 |
extern int sepol_user_query(sepol_handle_t * handle, |
| 47 |
const sepol_policydb_t * p, |
| 48 |
const sepol_user_key_t * key, |
| 49 |
sepol_user_t ** response); |
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
extern int sepol_user_iterate(sepol_handle_t * handle, |
| 57 |
const sepol_policydb_t * policydb, |
| 58 |
int (*fn) (const sepol_user_t * user, |
| 59 |
void *fn_arg), void *arg); |
| 60 |
|
| 61 |
#ifdef __cplusplus |
| 62 |
} |
| 63 |
#endif |
| 64 |
|
| 65 |
#endif |