Lines Matching refs:handle

7 #include "handle.h"
15 static int user_to_record(sepol_handle_t * handle,
28 if (sepol_user_create(handle, &tmp_record) < 0)
31 if (sepol_user_set_name(handle, tmp_record, name) < 0)
38 if (sepol_user_add_role(handle, tmp_record, role) < 0)
51 ERR(handle, "could not copy MLS level");
57 ERR(handle, "could not copy MLS level");
61 if (mls_to_string(handle, policydb, &context, &str) < 0) {
67 if (sepol_user_set_mlslevel(handle, tmp_record, str) < 0) {
75 ERR(handle, "could not copy MLS range");
79 if (mls_to_string(handle, policydb, &context, &str) < 0) {
85 if (sepol_user_set_mlsrange(handle, tmp_record, str) < 0) {
96 /* FIXME: handle error */
101 int sepol_user_modify(sepol_handle_t * handle,
133 if (sepol_user_get_roles(handle, user, &roles, &num_roles) < 0)
164 ERR(handle, "undefined role %s for user %s",
184 ERR(handle, "MLS is enabled, but no MLS "
190 if (mls_from_string(handle, policydb, cmls_level, &context) < 0) {
196 ERR(handle, "could not copy MLS level %s", cmls_level);
204 ERR(handle, "MLS is enabled, but no MLS"
210 if (mls_from_string(handle, policydb, cmls_range, &context) < 0) {
215 ERR(handle, "could not copy MLS range %s", cmls_range);
221 ERR(handle, "MLS is disabled, but MLS level/range "
264 ERR(handle, "unable to expand role set");
273 ERR(handle, "out of memory");
276 ERR(handle, "could not load %s into policy", name);
287 int sepol_user_exists(sepol_handle_t * handle __attribute__ ((unused)),
300 handle = NULL;
304 int sepol_user_count(sepol_handle_t * handle __attribute__ ((unused)),
311 handle = NULL;
315 int sepol_user_query(sepol_handle_t * handle,
334 if (user_to_record(handle, policydb, usrdatum->s.value - 1, response) <
341 ERR(handle, "could not query user %s", cname);
345 int sepol_user_iterate(sepol_handle_t * handle,
361 if (user_to_record(handle, policydb, i, &user) < 0)
380 ERR(handle, "could not iterate over users");