Home | History | Annotate | Download | only in src

Lines Matching defs:out

47 	policydb_t *out;
177 ERR(state->handle, "Out of memory!");
183 ERR(state->handle, "Out of memory!");
191 new_type->s.value = ++state->out->p_types.nprim;
201 ret = hashtab_insert(state->out->p_types.table,
212 if (ebitmap_set_bit(&state->out->permissive_map, new_type->s.value, 1)) {
213 ERR(state->handle, "Out of memory!\n");
243 new_type = hashtab_search(state->out->p_types.table, id);
249 ERR(state->handle, "out of memory");
255 ERR(state->handle, "Out of memory!");
317 ERR(state->handle, "Out of memory!");
322 ERR(state->handle, "Out of memory!");
329 ERR(state->handle, "Out of memory!");
337 state->out->p_commons.nprim++;
340 hashtab_insert(state->out->p_commons.table, new_id,
352 ERR(state->handle, "Out of memory!");
399 if (expand_convert_type_set(state->out,
443 ERR(state->handle, "Out of memory!");
508 ERR(state->handle, "Out of memory!");
513 ERR(state->handle, "Out of memory!");
519 state->out->p_classes.nprim++;
529 ERR(state->handle, "Out of memory!");
535 hashtab_insert(state->out->p_classes.table, new_id,
554 ERR(state->handle, "Out of memory!");
559 hashtab_search(state->out->p_commons.table,
584 new_class = hashtab_search(state->out->p_classes.table, id);
620 dest = hashtab_search(state->out->p_types.table, (char *)key);
650 dest = hashtab_search(state->out->p_roles.table, (char *)key);
680 dest = hashtab_search(state->out->p_users.table, (char *)key);
695 * the out symbol table will have the type that the alias refers. Otherwise, we
737 ERR(state->handle, "Out of memory!");
743 ERR(state->handle, "Out of memory!");
757 ret = hashtab_insert(state->out->p_types.table,
771 if (ebitmap_set_bit(&state->out->permissive_map, new_alias->s.value, 1)) {
772 ERR(state->handle, "Out of memory!");
799 * types.types ebitmap in the out module to the counterparts of all the
834 (role_datum_t *)hashtab_search(state->out->p_roles.table, id);
842 ERR(state->handle, "Out of memory!");
854 state->out->p_roles.table,
861 ERR(state->handle, "Out of memory!");
899 (role_datum_t *) hashtab_search(state->out->p_roles.table, id);
903 ERR(state->handle, "Out of memory!");
910 ERR(state->handle, "Out of memory!");
915 state->out->p_roles.nprim++;
917 new_role->s.value = state->out->p_roles.nprim;
919 ret = hashtab_insert(state->out->p_roles.table,
935 ERR(state->handle, "Out of memory!");
943 (state->out, state->typemap, &role->types, &tmp_union_types, 1)) {
945 ERR(state->handle, "Out of memory!");
950 ERR(state->handle, "Out of memory!");
999 ERR(h, "Out of memory!");
1051 (user_datum_t *) hashtab_search(state->out->p_users.table, id);
1055 ERR(state->handle, "Out of memory!");
1060 state->out->p_users.nprim++;
1061 new_user->s.value = state->out->p_users.nprim;
1066 ERR(state->handle, "Out of memory!");
1070 ret = hashtab_insert(state->out->p_users.table,
1084 state->out, state->handle)) {
1089 state->out, state->handle)) {
1105 state->out, state->handle)) {
1109 state->out, state->handle)) {
1126 if (role_set_expand(&user->roles, &tmp_union, state->out, state->base, state->rolemap)) {
1127 ERR(state->handle, "Out of memory!");
1133 ERR(state->handle, "Out of memory!");
1169 ERR(state->handle, "Out of memory!");
1175 ERR(state->handle, "Out of memory!");
1180 state->out->p_bools.nprim++;
1181 new_bool->s.value = state->out->p_bools.nprim;
1183 ret = hashtab_insert(state->out->p_bools.table,
1232 state->out->p_levels.nprim++;
1234 if (hashtab_insert(state->out->p_levels.table,
1242 ERR(state->handle, "Out of memory!");
1278 state->out->p_cats.nprim++;
1279 if (hashtab_insert(state->out->p_cats.table,
1287 ERR(state->handle, "Out of memory!");
1303 for (l = state->out->role_allow; l && l->next; l = l->next) ;
1310 if (role_set_expand(&cur->roles, &roles, state->out, state->base, state->rolemap)) {
1311 ERR(state->handle, "Out of memory!");
1315 if (role_set_expand(&cur->new_roles, &new_roles, state->out, state->base, state->rolemap)) {
1316 ERR(state->handle, "Out of memory!");
1327 cur_allow = state->out->role_allow;
1339 ERR(state->handle, "Out of memory!");
1348 state->out->role_allow = n;
1372 for (l = state->out->role_tr; l && l->next; l = l->next) ;
1379 if (role_set_expand(&cur->roles, &roles, state->out, state->base, state->rolemap)) {
1380 ERR(state->handle, "Out of memory!");
1384 (state->out, state->typemap, &cur->types, &types, 1)) {
1385 ERR(state->handle, "Out of memory!");
1398 cur_trans = state->out->role_tr;
1415 state->out->p_role_val_to_name[i],
1416 state->out->p_type_val_to_name[j],
1417 state->out->p_class_val_to_name[k],
1418 state->out->p_role_val_to_name[mapped_role - 1],
1419 state->out->p_role_val_to_name[cur_trans->new_role - 1]);
1432 "Out of memory!");
1444 state->out->role_tr = n;
1473 ERR(state->handle, "Out of memory!");
1484 if (expand_convert_type_set(state->out, state->typemap,
1486 ERR(state->handle, "Out of memory!");
1490 if (expand_convert_type_set(state->out, state->typemap,
1492 ERR(state->handle, "Out of memory!");
1501 ERR(state->handle, "Out of memory!");
1523 state->out->p_type_val_to_name[i],
1524 state->out->p_type_val_to_name[j],
1525 state->out->p_class_val_to_name[cur_trans->tclass - 1],
1526 state->out->p_type_val_to_name[cur_trans->otype - 1],
1527 state->out->p_type_val_to_name[mapped_otype - 1]);
1539 ERR(state->handle, "Out of memory!");
1546 ERR(state->handle, "Out of memory!");
1559 end->next = state->out->filename_trans;
1560 state->out->filename_trans = cur_trans;
1575 range_trans_t *rt, *check_rt = state->out->range_tr;
1579 if (mls_semantic_range_expand(trange, &exp_range, state->out,
1581 goto out;
1595 state->out->p_type_val_to_name[stype - 1],
1596 state->out->p_type_val_to_name[ttype - 1],
1597 state->out->p_class_val_to_name[tclass -
1599 goto out;
1607 goto out;
1612 ERR(state->handle, "Out of memory!");
1613 goto out;
1616 rt->next = state->out->range_tr;
1617 state->out->range_tr = rt;
1623 ERR(state->handle, "Out of memory!");
1624 goto out;
1629 out:
1651 if (expand_convert_type_set(state->out, state->typemap,
1653 ERR(state->handle, "Out of memory!");
1656 if (expand_convert_type_set(state->out, state->typemap,
1659 ERR(state->handle, "Out of memory!");
2065 if (cond_normalize_expr(state->out, cn)) {
2102 ERR(state->handle, "Out of memory");
2113 new_cond = cond_node_search(state->out, state->out->cond_list, tmp);
2117 ERR(state->handle, "Out of memory!");
2124 (state->out, cn->avtrue_list, &state->out->te_cond_avtab,
2129 (state->out, cn->avfalse_list, &state->out->te_cond_avtab,
2156 ERR(state->handle, "Out of memory!");
2163 state->out->ocontexts[i] = n;
2197 ERR(state->handle, "Out of memory!");
2215 ERR(state->handle, "Out of memory!");
2222 state->out->ocontexts[i] = n;
2238 ERR(state->handle, "Out of memory!");
2243 ERR(state->handle, "Out of memory!");
2260 ERR(state->handle, "Out of memory!");
2276 ERR(state->handle, "Out of memory!");
2310 ERR(state->handle, "Out of memory!");
2317 ERR(state->handle, "Out of memory!");
2321 state->out->genfs = newgenfs;
2330 ERR(state->handle, "Out of memory!");
2336 ERR(state->handle, "Out of memory!");
2358 policydb_t *p = state->out;
2366 ERR(state->handle, "Out of memory!");
2374 ERR(state->handle, "Out of memory!");
2446 int role_set_expand(role_set_t * x, ebitmap_t * r, policydb_t * out, policydb_t * base, uint32_t * rolemap)
2451 policydb_t *p = out;
2593 goto out;
2620 out:
2730 if (avtab_alloc(&state->out->te_avtab, MAX_AVTAB_SIZE)) {
2731 ERR(state->handle, "Out of Memory!");
2735 if (avtab_alloc(&state->out->te_cond_avtab, MAX_AVTAB_SIZE)) {
2736 ERR(state->handle, "Out of Memory!");
2769 (state->out, state->typemap, cur_avrule))
2774 state->out->unsupported_format = 1;
2777 (state->handle, state->out, state->typemap,
2778 cur_avrule, &state->out->te_avtab, NULL,
2817 policydb_t * out, uint32_t * typemap,
2827 state.out = out;
2945 policydb_t * base, policydb_t * out, int verbose, int check)
2967 state.out = out;
2975 state.out->policy_type = POLICY_KERN;
2976 state.out->policyvers = POLICYDB_VERSION_MAX;
2978 /* Copy mls state from base to out */
2979 out->mls = base->mls;
2980 out->handle_unknown = base->handle_unknown;
2982 /* Copy target from base to out */
2983 out->target_platform = base->target_platform;
2986 if (ebitmap_cpy(&out->policycaps, &base->policycaps)) {
2987 ERR(handle, "Out of memory!");
2994 ERR(handle, "Out of memory!");
3000 ERR(handle, "Out of memory!");
3006 ERR(handle, "Out of memory!");
3012 ERR(handle, "Out of memory!");
3052 if (policydb_index_others(handle, out, verbose)) {
3053 ERR(handle, "Error while indexing out symbols");
3074 if (policydb_index_others(handle, out, verbose)) {
3075 ERR(handle, "Error while indexing out symbols");
3090 if (policydb_index_classes(out)) {
3091 ERR(handle, "Error while indexing out classes");
3094 if (policydb_index_others(handle, out, verbose)) {
3095 ERR(handle, "Error while indexing out symbols");
3128 if (hashtab_map(state.out->p_roles.table, role_remap_dominates, &state)) {
3143 cond_optimize_lists(state.out->cond_list);
3144 if (evaluate_conds(state.out))
3148 if (ocontext_copy(&state, out->target_platform))
3156 state.out->attr_type_map = malloc(state.out->p_types.nprim *
3158 state.out->type_attr_map = malloc(state.out->p_types.nprim *
3160 if (!state.out->attr_type_map || !state.out->type_attr_map) {
3161 ERR(handle, "Out of memory!");
3164 for (i = 0; i < state.out->p_types.nprim; i++) {
3165 ebitmap_init(&state.out->type_attr_map[i]);
3166 ebitmap_init(&state.out->attr_type_map[i]);
3168 if (ebitmap_set_bit(&state.out->type_attr_map[i], i, 1)) {
3169 ERR(handle, "Out of memory!");
3173 if (hashtab_map(state.out->p_types.table, type_attr_map, &state))
3176 if (hierarchy_check_constraints(handle, state.out))
3180 (handle, state.out,
3181 state.out->global->branch_list->avrules))
3205 ERR(NULL, "Out of memory!");
3213 ERR(NULL, "Out of memory!");
3315 ERR(NULL, "Out of memory!");
3338 ERR(NULL, "Out of memory!");
3344 ERR(NULL, "Out of memory!");
3448 ERR(NULL, "Out of memory!");