Lines Matching defs:mod
88 static void policy_module_destroy(policy_module_t * mod)
91 if (mod == NULL) {
95 free(mod->map[i]);
97 for (i = 0; mod->perm_map != NULL && i < mod->policy->p_classes.nprim;
99 free(mod->perm_map[i]);
101 free(mod->perm_map);
102 free(mod->perm_map_len);
103 free(mod->avdecl_map);
104 free(mod);
132 policy_module_t *mod = state->cur;
187 if (perm->s.value > mod->perm_map_len[sclassi]) {
193 memcpy(newmap, mod->perm_map[sclassi],
194 mod->perm_map_len[sclassi] * sizeof(*newmap));
195 free(mod->perm_map[sclassi]);
196 mod->perm_map[sclassi] = newmap;
197 mod->perm_map_len[sclassi] = perm->s.value;
199 mod->perm_map[sclassi][perm->s.value - 1] = dest_perm->s.value;
858 policy_module_t *mod = state->cur;
878 target_id = mod->policy->p_type_val_to_name[primval - 1];
926 mod->map[SYM_TYPES][primval - 1]);
927 assert(mod->map[SYM_TYPES][type->s.value - 1] ==
945 mod->map[SYM_TYPES][type->s.value - 1] = base_type->primary;
959 policy_module_t * mod, link_state_t * state
966 assert(mod->map[SYM_TYPES][i]);
968 (&dst->types, mod->map[SYM_TYPES][i] - 1, 1)) {
975 assert(mod->map[SYM_TYPES][i]);
977 (&dst->negset, mod->map[SYM_TYPES][i] - 1, 1)) {
993 policy_module_t * mod, link_state_t * state)
998 if (type_set_convert(types, &ts_tmp, mod, state) == -1) {
1014 policy_module_t * mod, link_state_t * state)
1023 assert(mod->map[SYM_ROLES][i]);
1025 (&tmp, mod->map[SYM_ROLES][i] - 1, 1)) {
1043 policy_module_t * mod, link_state_t * state)
1047 if (!mod->policy->mls)
1054 assert(mod->map[SYM_LEVELS][src->sens - 1]);
1055 dst->sens = mod->map[SYM_LEVELS][src->sens - 1];
1069 assert(mod->map[SYM_CATS][src_cat->low - 1]);
1070 dst->cat->low = mod->map[SYM_CATS][src_cat->low - 1];
1071 assert(mod->map[SYM_CATS][src_cat->high - 1]);
1072 dst->cat->high = mod->map[SYM_CATS][src_cat->high - 1];
1079 policy_module_t * mod, link_state_t * state)
1082 ret = mls_level_convert(&src->level[0], &dst->level[0], mod, state);
1085 ret = mls_level_convert(&src->level[1], &dst->level[1], mod, state);
1099 policy_module_t *mod = state->cur;
1119 assert(mod->map[SYM_ROLES][i]);
1121 (&e_tmp, mod->map[SYM_ROLES][i] - 1, 1)) {
1129 if (type_set_or_convert(&role->types, &dest_role->types, mod, state)) {
1138 assert(mod->map[SYM_ROLES][i]);
1140 (&e_tmp, mod->map[SYM_ROLES][i] - 1, 1)) {
1167 policy_module_t *mod = state->cur;
1193 assert(mod->map[SYM_TYPES][i]);
1195 (&e_tmp, mod->map[SYM_TYPES][i] - 1, 1)) {
1218 policy_module_t *mod = state->cur;
1235 if (role_set_or_convert(&user->roles, &new_user->roles, mod, state)) {
1239 if (mls_range_convert(&user->range, &new_user->range, mod, state))
1242 if (mls_level_convert(&user->dfltlevel, &new_user->dfltlevel, mod, state))
1492 policy_module_t * mod, link_state_t * state)
1510 mod, state))
1514 mod, state))
1519 assert(mod->map[SYM_CLASSES][i]);
1522 mod->map[SYM_CLASSES][i] - 1, 1)) {
1528 if (mls_range_convert(&rule->trange, &new_rule->trange, mod, state))