Home | History | Annotate | Download | only in src

Lines Matching defs:out

48 	policydb_t *out;
102 ERR(state->handle, "Out of memory!");
108 ERR(state->handle, "Out of memory!");
116 new_type->s.value = ++state->out->p_types.nprim;
126 ret = hashtab_insert(state->out->p_types.table,
137 if (ebitmap_set_bit(&state->out->permissive_map, new_type->s.value, 1)) {
138 ERR(state->handle, "Out of memory!\n");
168 new_type = hashtab_search(state->out->p_types.table, id);
174 ERR(state->handle, "out of memory");
180 ERR(state->handle, "Out of memory!");
242 ERR(state->handle, "Out of memory!");
247 ERR(state->handle, "Out of memory!");
254 ERR(state->handle, "Out of memory!");
262 state->out->p_commons.nprim++;
265 hashtab_insert(state->out->p_commons.table, new_id,
277 ERR(state->handle, "Out of memory!");
324 if (expand_convert_type_set(state->out,
368 ERR(state->handle, "Out of memory!");
433 ERR(state->handle, "Out of memory!");
438 ERR(state->handle, "Out of memory!");
444 state->out->p_classes.nprim++;
454 ERR(state->handle, "Out of memory!");
460 hashtab_insert(state->out->p_classes.table, new_id,
479 ERR(state->handle, "Out of memory!");
484 hashtab_search(state->out->p_commons.table,
509 new_class = hashtab_search(state->out->p_classes.table, id);
545 dest = hashtab_search(state->out->p_types.table, (char *)key);
575 dest = hashtab_search(state->out->p_roles.table, (char *)key);
605 dest = hashtab_search(state->out->p_users.table, (char *)key);
620 * the out symbol table will have the type that the alias refers. Otherwise, we
662 ERR(state->handle, "Out of memory!");
668 ERR(state->handle, "Out of memory!");
682 ret = hashtab_insert(state->out->p_types.table,
696 if (ebitmap_set_bit(&state->out->permissive_map, new_alias->s.value, 1)) {
697 ERR(state->handle, "Out of memory!");
724 * types.types ebitmap in the out module to the counterparts of all the
759 (role_datum_t *)hashtab_search(state->out->p_roles.table, id);
767 ERR(state->handle, "Out of memory!");
779 state->out->p_roles.table,
786 ERR(state->handle, "Out of memory!");
824 (role_datum_t *) hashtab_search(state->out->p_roles.table, id);
828 ERR(state->handle, "Out of memory!");
835 ERR(state->handle, "Out of memory!");
840 state->out->p_roles.nprim++;
842 new_role->s.value = state->out->p_roles.nprim;
844 ret = hashtab_insert(state->out->p_roles.table,
860 ERR(state->handle, "Out of memory!");
868 (state->out, state->typemap, &role->types, &tmp_union_types, 1)) {
870 ERR(state->handle, "Out of memory!");
875 ERR(state->handle, "Out of memory!");
925 ERR(h, "Out of memory!");
977 (user_datum_t *) hashtab_search(state->out->p_users.table, id);
981 ERR(state->handle, "Out of memory!");
986 state->out->p_users.nprim++;
987 new_user->s.value = state->out->p_users.nprim;
992 ERR(state->handle, "Out of memory!");
996 ret = hashtab_insert(state->out->p_users.table,
1010 state->out, state->handle)) {
1015 state->out, state->handle)) {
1031 state->out, state->handle)) {
1035 state->out, state->handle)) {
1052 if (role_set_expand(&user->roles, &tmp_union, state->out, state->base, state->rolemap)) {
1053 ERR(state->handle, "Out of memory!");
1059 ERR(state->handle, "Out of memory!");
1095 ERR(state->handle, "Out of memory!");
1101 ERR(state->handle, "Out of memory!");
1106 state->out->p_bools.nprim++;
1107 new_bool->s.value = state->out->p_bools.nprim;
1109 ret = hashtab_insert(state->out->p_bools.table,
1158 state->out->p_levels.nprim++;
1160 if (hashtab_insert(state->out->p_levels.table,
1168 ERR(state->handle, "Out of memory!");
1204 state->out->p_cats.nprim++;
1205 if (hashtab_insert(state->out->p_cats.table,
1213 ERR(state->handle, "Out of memory!");
1229 for (l = state->out->role_allow; l && l->next; l = l->next) ;
1236 if (role_set_expand(&cur->roles, &roles, state->out, state->base, state->rolemap)) {
1237 ERR(state->handle, "Out of memory!");
1241 if (role_set_expand(&cur->new_roles, &new_roles, state->out, state->base, state->rolemap)) {
1242 ERR(state->handle, "Out of memory!");
1253 cur_allow = state->out->role_allow;
1265 ERR(state->handle, "Out of memory!");
1274 state->out->role_allow = n;
1298 for (l = state->out->role_tr; l && l->next; l = l->next) ;
1305 if (role_set_expand(&cur->roles, &roles, state->out, state->base, state->rolemap)) {
1306 ERR(state->handle, "Out of memory!");
1310 (state->out, state->typemap, &cur->types, &types, 1)) {
1311 ERR(state->handle, "Out of memory!");
1324 cur_trans = state->out->role_tr;
1341 state->out->p_role_val_to_name[i],
1342 state->out->p_type_val_to_name[j],
1343 state->out->p_class_val_to_name[k],
1344 state->out->p_role_val_to_name[mapped_role - 1],
1345 state->out->p_role_val_to_name[cur_trans->new_role - 1]);
1358 "Out of memory!");
1370 state->out->role_tr = n;
1402 if (expand_convert_type_set(state->out, state->typemap,
1404 ERR(state->handle, "Out of memory!");
1408 if (expand_convert_type_set(state->out, state->typemap,
1410 ERR(state->handle, "Out of memory!");
1427 otype = hashtab_search(state->out->filename_trans,
1435 state->out->p_type_val_to_name[i],
1436 state->out->p_type_val_to_name[j],
1437 state->out->p_class_val_to_name[cur_rule->tclass - 1],
1439 state->out->p_type_val_to_name[otype->otype - 1],
1440 state->out->p_type_val_to_name[mapped_otype - 1]);
1446 ERR(state->handle, "Out of memory!");
1452 ERR(state->handle, "Out of memory!");
1461 ERR(state->handle, "Out of memory!");
1466 rc = hashtab_insert(state->out->filename_trans,
1470 ERR(state->handle, "Out of memory!");
1494 ERR(state->handle, "Out of memory!");
1498 if (mls_semantic_range_expand(trange, exp_range, state->out,
1506 r = hashtab_search(state->out->range_tr, (hashtab_key_t) &key);
1518 state->out->p_type_val_to_name[stype - 1],
1519 state->out->p_type_val_to_name[ttype - 1],
1520 state->out->p_class_val_to_name[tclass - 1]);
1526 ERR(state->handle, "Out of memory!");
1533 rc = hashtab_insert(state->out->range_tr, (hashtab_key_t) rt,
1536 ERR(state->handle, "Out of memory!");
1568 if (expand_convert_type_set(state->out, state->typemap,
1570 ERR(state->handle, "Out of memory!");
1573 if (expand_convert_type_set(state->out, state->typemap,
1576 ERR(state->handle, "Out of memory!");
1802 ERR(handle, "Out of memory!");
2031 if (cond_normalize_expr(state->out, cn)) {
2068 ERR(state->handle, "Out of memory");
2079 new_cond = cond_node_search(state->out, state->out->cond_list, tmp);
2083 ERR(state->handle, "Out of memory!");
2090 (state->out, cn->avtrue_list, &state->out->te_cond_avtab,
2095 (state->out, cn->avfalse_list, &state->out->te_cond_avtab,
2122 ERR(state->handle, "Out of memory!");
2129 state->out->ocontexts[i] = n;
2159 ERR(state->handle, "Out of memory!");
2170 ERR(state->handle, "Out of memory!");
2188 ERR(state->handle, "Out of memory!");
2195 state->out->ocontexts[i] = n;
2211 ERR(state->handle, "Out of memory!");
2216 ERR(state->handle, "Out of memory!");
2233 ERR(state->handle, "Out of memory!");
2249 ERR(state->handle, "Out of memory!");
2283 ERR(state->handle, "Out of memory!");
2290 ERR(state->handle, "Out of memory!");
2294 state->out->genfs = newgenfs;
2303 ERR(state->handle, "Out of memory!");
2309 ERR(state->handle, "Out of memory!");
2331 policydb_t *p = state->out;
2359 ERR(state->handle, "Out of memory!");
2428 int role_set_expand(role_set_t * x, ebitmap_t * r, policydb_t * out, policydb_t * base, uint32_t * rolemap)
2433 policydb_t *p = out;
2588 goto out;
2615 out:
2739 if (avtab_alloc(&state->out->te_avtab, MAX_AVTAB_SIZE)) {
2740 ERR(state->handle, "Out of Memory!");
2744 if (avtab_alloc(&state->out->te_cond_avtab, MAX_AVTAB_SIZE)) {
2745 ERR(state->handle, "Out of Memory!");
2778 (state->out, state->typemap, cur_avrule))
2783 state->out->unsupported_format = 1;
2785 (state->handle, state->out, state->typemap,
2786 cur_avrule, &state->out->te_avtab, NULL,
2825 policydb_t * out, uint32_t * typemap,
2835 state.out = out;
2953 policydb_t * base, policydb_t * out, int verbose, int check)
2975 state.out = out;
2983 state.out->policy_type = POLICY_KERN;
2984 state.out->policyvers = POLICYDB_VERSION_MAX;
2986 /* Copy mls state from base to out */
2987 out->mls = base->mls;
2988 out->handle_unknown = base->handle_unknown;
2990 /* Copy target from base to out */
2991 out->target_platform = base->target_platform;
2994 if (ebitmap_cpy(&out->policycaps, &base->policycaps)) {
2995 ERR(handle, "Out of memory!");
3002 ERR(handle, "Out of memory!");
3008 ERR(handle, "Out of memory!");
3014 ERR(handle, "Out of memory!");
3020 ERR(handle, "Out of memory!");
3060 if (policydb_index_others(handle, out, verbose)) {
3061 ERR(handle, "Error while indexing out symbols");
3082 if (policydb_index_others(handle, out, verbose)) {
3083 ERR(handle, "Error while indexing out symbols");
3098 if (policydb_index_classes(out)) {
3099 ERR(handle, "Error while indexing out classes");
3102 if (policydb_index_others(handle, out, verbose)) {
3103 ERR(handle, "Error while indexing out symbols");
3136 if (hashtab_map(state.out->p_roles.table, role_remap_dominates, &state)) {
3151 cond_optimize_lists(state.out->cond_list);
3152 if (evaluate_conds(state.out))
3156 if (ocontext_copy(&state, out->target_platform))
3164 state.out->attr_type_map = malloc(state.out->p_types.nprim *
3166 state.out->type_attr_map = malloc(state.out->p_types.nprim *
3168 if (!state.out->attr_type_map || !state.out->type_attr_map) {
3169 ERR(handle, "Out of memory!");
3172 for (i = 0; i < state.out->p_types.nprim; i++) {
3173 ebitmap_init(&state.out->type_attr_map[i]);
3174 ebitmap_init(&state.out->attr_type_map[i]);
3176 if (ebitmap_set_bit(&state.out->type_attr_map[i], i, 1)) {
3177 ERR(handle, "Out of memory!");
3181 if (hashtab_map(state.out->p_types.table, type_attr_map, &state))
3184 if (hierarchy_check_constraints(handle, state.out))
3188 (handle, state.out,
3189 state.out->global->branch_list->avrules))
3235 ERR(NULL, "Out of memory!");
3344 ERR(NULL, "Out of memory!");
3367 ERR(NULL, "Out of memory!");
3373 ERR(NULL, "Out of memory!");
3477 ERR(NULL, "Out of memory!");