| 1 |
#ifndef _SELINUX_CONTEXT_H_ |
| 2 |
#define _SELINUX_CONTEXT_H_ |
| 3 |
|
| 4 |
#ifdef __cplusplus |
| 5 |
extern "C" { |
| 6 |
#endif |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
typedef struct { |
| 13 |
void *ptr; |
| 14 |
} context_s_t; |
| 15 |
|
| 16 |
typedef context_s_t *context_t; |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
extern context_t context_new(const char *); |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
extern char *context_str(context_t); |
| 29 |
|
| 30 |
|
| 31 |
extern void context_free(context_t); |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
extern const char *context_type_get(context_t); |
| 36 |
extern const char *context_range_get(context_t); |
| 37 |
extern const char *context_role_get(context_t); |
| 38 |
extern const char *context_user_get(context_t); |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
extern int context_type_set(context_t, const char *); |
| 43 |
extern int context_range_set(context_t, const char *); |
| 44 |
extern int context_role_set(context_t, const char *); |
| 45 |
extern int context_user_set(context_t, const char *); |
| 46 |
|
| 47 |
#ifdef __cplusplus |
| 48 |
} |
| 49 |
#endif |
| 50 |
#endif |