Lines Matching defs:out
47 policydb_t *out;
101 ERR(state->handle, "Out of memory!");
107 ERR(state->handle, "Out of memory!");
115 new_type->s.value = ++state->out->p_types.nprim;
125 ret = hashtab_insert(state->out->p_types.table,
136 if (ebitmap_set_bit(&state->out->permissive_map, new_type->s.value, 1)) {
137 ERR(state->handle, "Out of memory!\n");
167 new_type = hashtab_search(state->out->p_types.table, id);
173 ERR(state->handle, "out of memory");
179 ERR(state->handle, "Out of memory!");
241 ERR(state->handle, "Out of memory!");
246 ERR(state->handle, "Out of memory!");
253 ERR(state->handle, "Out of memory!");
261 state->out->p_commons.nprim++;
264 hashtab_insert(state->out->p_commons.table, new_id,
276 ERR(state->handle, "Out of memory!");
323 if (expand_convert_type_set(state->out,
367 ERR(state->handle, "Out of memory!");
432 ERR(state->handle, "Out of memory!");
437 ERR(state->handle, "Out of memory!");
443 state->out->p_classes.nprim++;
453 ERR(state->handle, "Out of memory!");
459 hashtab_insert(state->out->p_classes.table, new_id,
478 ERR(state->handle, "Out of memory!");
483 hashtab_search(state->out->p_commons.table,
508 new_class = hashtab_search(state->out->p_classes.table, id);
544 dest = hashtab_search(state->out->p_types.table, (char *)key);
574 dest = hashtab_search(state->out->p_roles.table, (char *)key);
604 dest = hashtab_search(state->out->p_users.table, (char *)key);
619 * the out symbol table will have the type that the alias refers. Otherwise, we
661 ERR(state->handle, "Out of memory!");
667 ERR(state->handle, "Out of memory!");
681 ret = hashtab_insert(state->out->p_types.table,
695 if (ebitmap_set_bit(&state->out->permissive_map, new_alias->s.value, 1)) {
696 ERR(state->handle, "Out of memory!");
723 * types.types ebitmap in the out module to the counterparts of all the
758 (role_datum_t *)hashtab_search(state->out->p_roles.table, id);
766 ERR(state->handle, "Out of memory!");
778 state->out->p_roles.table,
785 ERR(state->handle, "Out of memory!");
823 (role_datum_t *) hashtab_search(state->out->p_roles.table, id);
827 ERR(state->handle, "Out of memory!");
834 ERR(state->handle, "Out of memory!");
839 state->out->p_roles.nprim++;
841 new_role->s.value = state->out->p_roles.nprim;
843 ret = hashtab_insert(state->out->p_roles.table,
859 ERR(state->handle, "Out of memory!");
867 (state->out, state->typemap, &role->types, &tmp_union_types, 1)) {
869 ERR(state->handle, "Out of memory!");
874 ERR(state->handle, "Out of memory!");
924 ERR(h, "Out of memory!");
976 (user_datum_t *) hashtab_search(state->out->p_users.table, id);
980 ERR(state->handle, "Out of memory!");
985 state->out->p_users.nprim++;
986 new_user->s.value = state->out->p_users.nprim;
991 ERR(state->handle, "Out of memory!");
995 ret = hashtab_insert(state->out->p_users.table,
1009 state->out, state->handle)) {
1014 state->out, state->handle)) {
1030 state->out, state->handle)) {
1034 state->out, state->handle)) {
1051 if (role_set_expand(&user->roles, &tmp_union, state->out, state->base, state->rolemap)) {
1052 ERR(state->handle, "Out of memory!");
1058 ERR(state->handle, "Out of memory!");
1094 ERR(state->handle, "Out of memory!");
1100 ERR(state->handle, "Out of memory!");
1105 state->out->p_bools.nprim++;
1106 new_bool->s.value = state->out->p_bools.nprim;
1108 ret = hashtab_insert(state->out->p_bools.table,
1157 state->out->p_levels.nprim++;
1159 if (hashtab_insert(state->out->p_levels.table,
1167 ERR(state->handle, "Out of memory!");
1203 state->out->p_cats.nprim++;
1204 if (hashtab_insert(state->out->p_cats.table,
1212 ERR(state->handle, "Out of memory!");
1228 for (l = state->out->role_allow; l && l->next; l = l->next) ;
1235 if (role_set_expand(&cur->roles, &roles, state->out, state->base, state->rolemap)) {
1236 ERR(state->handle, "Out of memory!");
1240 if (role_set_expand(&cur->new_roles, &new_roles, state->out, state->base, state->rolemap)) {
1241 ERR(state->handle, "Out of memory!");
1252 cur_allow = state->out->role_allow;
1264 ERR(state->handle, "Out of memory!");
1273 state->out->role_allow = n;
1297 for (l = state->out->role_tr; l && l->next; l = l->next) ;
1304 if (role_set_expand(&cur->roles, &roles, state->out, state->base, state->rolemap)) {
1305 ERR(state->handle, "Out of memory!");
1309 (state->out, state->typemap, &cur->types, &types, 1)) {
1310 ERR(state->handle, "Out of memory!");
1323 cur_trans = state->out->role_tr;
1340 state->out->p_role_val_to_name[i],
1341 state->out->p_type_val_to_name[j],
1342 state->out->p_class_val_to_name[k],
1343 state->out->p_role_val_to_name[mapped_role - 1],
1344 state->out->p_role_val_to_name[cur_trans->new_role - 1]);
1357 "Out of memory!");
1369 state->out->role_tr = n;
1399 if (expand_convert_type_set(state->out, state->typemap,
1401 ERR(state->handle, "Out of memory!");
1405 if (expand_convert_type_set(state->out, state->typemap,
1407 ERR(state->handle, "Out of memory!");
1420 cur_trans = state->out->filename_trans;
1431 state->out->p_type_val_to_name[i],
1432 state->out->p_type_val_to_name[j],
1433 state->out->p_class_val_to_name[cur_trans->tclass - 1],
1435 state->out->p_type_val_to_name[cur_trans->otype - 1],
1436 state->out->p_type_val_to_name[mapped_otype - 1]);
1448 ERR(state->handle, "Out of memory!");
1452 new_trans->next = state->out->filename_trans;
1453 state->out->filename_trans = new_trans;
1457 ERR(state->handle, "Out of memory!");
1479 range_trans_t *rt, *check_rt = state->out->range_tr;
1483 if (mls_semantic_range_expand(trange, &exp_range, state->out,
1485 goto out;
1499 state->out->p_type_val_to_name[stype - 1],
1500 state->out->p_type_val_to_name[ttype - 1],
1501 state->out->p_class_val_to_name[tclass -
1503 goto out;
1511 goto out;
1516 ERR(state->handle, "Out of memory!");
1517 goto out;
1520 rt->next = state->out->range_tr;
1521 state->out->range_tr = rt;
1527 ERR(state->handle, "Out of memory!");
1528 goto out;
1533 out:
1555 if (expand_convert_type_set(state->out, state->typemap,
1557 ERR(state->handle, "Out of memory!");
1560 if (expand_convert_type_set(state->out, state->typemap,
1563 ERR(state->handle, "Out of memory!");
1862 ERR(handle, "Out of memory!");
2015 if (cond_normalize_expr(state->out, cn)) {
2052 ERR(state->handle, "Out of memory");
2063 new_cond = cond_node_search(state->out, state->out->cond_list, tmp);
2067 ERR(state->handle, "Out of memory!");
2074 (state->out, cn->avtrue_list, &state->out->te_cond_avtab,
2079 (state->out, cn->avfalse_list, &state->out->te_cond_avtab,
2106 ERR(state->handle, "Out of memory!");
2113 state->out->ocontexts[i] = n;
2143 ERR(state->handle, "Out of memory!");
2154 ERR(state->handle, "Out of memory!");
2172 ERR(state->handle, "Out of memory!");
2179 state->out->ocontexts[i] = n;
2195 ERR(state->handle, "Out of memory!");
2200 ERR(state->handle, "Out of memory!");
2217 ERR(state->handle, "Out of memory!");
2233 ERR(state->handle, "Out of memory!");
2267 ERR(state->handle, "Out of memory!");
2274 ERR(state->handle, "Out of memory!");
2278 state->out->genfs = newgenfs;
2287 ERR(state->handle, "Out of memory!");
2293 ERR(state->handle, "Out of memory!");
2315 policydb_t *p = state->out;
2343 ERR(state->handle, "Out of memory!");
2412 int role_set_expand(role_set_t * x, ebitmap_t * r, policydb_t * out, policydb_t * base, uint32_t * rolemap)
2417 policydb_t *p = out;
2559 goto out;
2586 out:
2707 if (avtab_alloc(&state->out->te_avtab, MAX_AVTAB_SIZE)) {
2708 ERR(state->handle, "Out of Memory!");
2712 if (avtab_alloc(&state->out->te_cond_avtab, MAX_AVTAB_SIZE)) {
2713 ERR(state->handle, "Out of Memory!");
2746 (state->out, state->typemap, cur_avrule))
2751 state->out->unsupported_format = 1;
2753 (state->handle, state->out, state->typemap,
2754 cur_avrule, &state->out->te_avtab, NULL,
2793 policydb_t * out, uint32_t * typemap,
2803 state.out = out;
2921 policydb_t * base, policydb_t * out, int verbose, int check)
2943 state.out = out;
2951 state.out->policy_type = POLICY_KERN;
2952 state.out->policyvers = POLICYDB_VERSION_MAX;
2954 /* Copy mls state from base to out */
2955 out->mls = base->mls;
2956 out->handle_unknown = base->handle_unknown;
2958 /* Copy target from base to out */
2959 out->target_platform = base->target_platform;
2962 if (ebitmap_cpy(&out->policycaps, &base->policycaps)) {
2963 ERR(handle, "Out of memory!");
2970 ERR(handle, "Out of memory!");
2976 ERR(handle, "Out of memory!");
2982 ERR(handle, "Out of memory!");
2988 ERR(handle, "Out of memory!");
3028 if (policydb_index_others(handle, out, verbose)) {
3029 ERR(handle, "Error while indexing out symbols");
3050 if (policydb_index_others(handle, out, verbose)) {
3051 ERR(handle, "Error while indexing out symbols");
3066 if (policydb_index_classes(out)) {
3067 ERR(handle, "Error while indexing out classes");
3070 if (policydb_index_others(handle, out, verbose)) {
3071 ERR(handle, "Error while indexing out symbols");
3104 if (hashtab_map(state.out->p_roles.table, role_remap_dominates, &state)) {
3119 cond_optimize_lists(state.out->cond_list);
3120 if (evaluate_conds(state.out))
3124 if (ocontext_copy(&state, out->target_platform))
3132 state.out->attr_type_map = malloc(state.out->p_types.nprim *
3134 state.out->type_attr_map = malloc(state.out->p_types.nprim *
3136 if (!state.out->attr_type_map || !state.out->type_attr_map) {
3137 ERR(handle, "Out of memory!");
3140 for (i = 0; i < state.out->p_types.nprim; i++) {
3141 ebitmap_init(&state.out->type_attr_map[i]);
3142 ebitmap_init(&state.out->attr_type_map[i]);
3144 if (ebitmap_set_bit(&state.out->type_attr_map[i], i, 1)) {
3145 ERR(handle, "Out of memory!");
3149 if (hashtab_map(state.out->p_types.table, type_attr_map, &state))
3152 if (hierarchy_check_constraints(handle, state.out))
3156 (handle, state.out,
3157 state.out->global->branch_list->avrules))
3203 ERR(NULL, "Out of memory!");
3312 ERR(NULL, "Out of memory!");
3335 ERR(NULL, "Out of memory!");
3341 ERR(NULL, "Out of memory!");
3445 ERR(NULL, "Out of memory!");