Home | History | Annotate | Download | only in src

Lines Matching refs:handle

11 #include "handle.h"
87 int context_to_string(sepol_handle_t * handle,
135 ERR(handle, "out of memory, could not convert " "context to string");
143 int context_from_record(sepol_handle_t * handle,
162 ERR(handle, "out of memory");
171 ERR(handle, "user %s is not defined", user);
180 ERR(handle, "role %s is not defined", role);
189 ERR(handle, "type %s is not defined", type);
196 ERR(handle, "MLS is disabled, but MLS context \"%s\" found",
200 ERR(handle, "MLS is enabled, but no MLS context found");
203 if (mls && (mls_from_string(handle, policydb, mls, scontext) < 0))
209 ERR(handle,
213 ERR(handle,
235 ERR(handle, "could not create context structure");
242 int context_to_record(sepol_handle_t * handle,
251 if (sepol_context_create(handle, &tmp_record) < 0)
254 if (sepol_context_set_user(handle, tmp_record,
259 if (sepol_context_set_role(handle, tmp_record,
264 if (sepol_context_set_type(handle, tmp_record,
270 if (mls_to_string(handle, policydb, context, &mls) < 0)
273 if (sepol_context_set_mls(handle, tmp_record, mls) < 0)
282 ERR(handle, "could not create context record");
291 int context_from_string(sepol_handle_t * handle,
307 if (sepol_context_from_string(handle, con_cpy, &ctx_record) < 0)
311 if (context_from_record(handle, policydb, cptr, ctx_record) < 0)
319 ERR(handle, "out of memory");
322 ERR(handle, "could not create context structure");
328 int sepol_context_check(sepol_handle_t * handle,
334 int ret = context_from_record(handle, &policydb->p, &con, context);