1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
/* Copyright (C) 2005 Red Hat, Inc. */
#include <sepol/context_record.h>
#include "handle.h"
typedef sepol_context_t semanage_context_t;
#define _SEMANAGE_CONTEXT_DEFINED_
#include "context_internal.h"
/* User */
const char *semanage_context_get_user(const semanage_context_t * con)
{
return sepol_context_get_user(con);
}
int semanage_context_set_user(semanage_handle_t * handle,
semanage_context_t * con, const char *user)
{
return sepol_context_set_user(handle->sepolh, con, user);
}
/* Role */
const char *semanage_context_get_role(const semanage_context_t * con)
{
return sepol_context_get_role(con);
}
int semanage_context_set_role(semanage_handle_t * handle,
semanage_context_t * con, const char *role)
{
return sepol_context_set_role(handle->sepolh, con, role);
}
/* Type */
const char *semanage_context_get_type(const semanage_context_t * con)
{
return sepol_context_get_type(con);
}
int semanage_context_set_type(semanage_handle_t * handle,
semanage_context_t * con, const char *type)
{
return sepol_context_set_type(handle->sepolh, con, type);
}
/* MLS */
const char *semanage_context_get_mls(const semanage_context_t * con)
{
return sepol_context_get_mls(con);
}
int semanage_context_set_mls(semanage_handle_t * handle,
semanage_context_t * con, const char *mls_range)
{
return sepol_context_set_mls(handle->sepolh, con, mls_range);
}
/* Create/Clone/Destroy */
int semanage_context_create(semanage_handle_t * handle,
semanage_context_t ** con_ptr)
{
return sepol_context_create(handle->sepolh, con_ptr);
}
int semanage_context_clone(semanage_handle_t * handle,
const semanage_context_t * con,
semanage_context_t ** con_ptr)
{
return sepol_context_clone(handle->sepolh, con, con_ptr);
}
hidden_def(semanage_context_clone)
void semanage_context_free(semanage_context_t * con)
{
sepol_context_free(con);
}
hidden_def(semanage_context_free)
/* Parse to/from string */
int semanage_context_from_string(semanage_handle_t * handle,
const char *str, semanage_context_t ** con)
{
return sepol_context_from_string(handle->sepolh, str, con);
}
hidden_def(semanage_context_from_string)
int semanage_context_to_string(semanage_handle_t * handle,
const semanage_context_t * con, char **str_ptr)
{
return sepol_context_to_string(handle->sepolh, con, str_ptr);
}
hidden_def(semanage_context_to_string)
|