Home | History | Annotate | Download | only in src

Lines Matching refs:con

25 const char *sepol_context_get_user(const sepol_context_t * con)
28 return con->user;
34 sepol_context_t * con, const char *user)
44 free(con->user);
45 con->user = tmp_user;
52 const char *sepol_context_get_role(const sepol_context_t * con)
55 return con->role;
61 sepol_context_t * con, const char *role)
70 free(con->role);
71 con->role = tmp_role;
78 const char *sepol_context_get_type(const sepol_context_t * con)
81 return con->type;
87 sepol_context_t * con, const char *type)
96 free(con->type);
97 con->type = tmp_type;
104 const char *sepol_context_get_mls(const sepol_context_t * con)
107 return con->mls;
113 sepol_context_t * con, const char *mls)
122 free(con->mls);
123 con->mls = tmp_mls;
133 sepol_context_t *con =
136 if (!con) {
141 con->user = NULL;
142 con->role = NULL;
143 con->type = NULL;
144 con->mls = NULL;
145 *con_ptr = con;
153 const sepol_context_t * con, sepol_context_t ** con_ptr)
158 if (!con) {
166 if (!(new_con->user = strdup(con->user)))
169 if (!(new_con->role = strdup(con->role)))
172 if (!(new_con->type = strdup(con->type)))
175 if (con->mls && !(new_con->mls = strdup(con->mls)))
193 void sepol_context_free(sepol_context_t * con)
196 if (!con)
199 free(con->user);
200 free(con->role);
201 free(con->type);
202 free(con->mls);
203 free(con);
209 const char *str, sepol_context_t ** con)
216 *con = NULL;
265 *con = tmp_con;
283 const sepol_context_t * con, char **str_ptr)
287 const int user_sz = strlen(con->user);
288 const int role_sz = strlen(con->role);
289 const int type_sz = strlen(con->type);
290 const int mls_sz = (con->mls) ? strlen(con->mls) : 0;
292 mls_sz + ((con->mls) ? 3 : 2);
298 if (con->mls) {
300 con->user, con->role, con->type, con->mls);
307 con->user, con->role, con->type);