Lines Matching full:range
48 int index_sens = context->range.level[l].sens; in mls_compute_context_len()
54 e = &context->range.level[l].cat; in mls_compute_context_len()
73 if (mls_level_eq(&context->range.level[0], in mls_compute_context_len()
74 &context->range.level[1])) in mls_compute_context_len()
108 context->range.level[l].sens - 1)); in mls_sid_to_context()
114 e = &context->range.level[l].cat; in mls_sid_to_context()
150 if (mls_level_eq(&context->range.level[0], in mls_sid_to_context()
151 &context->range.level[1])) in mls_sid_to_context()
199 if (!mls_range_isvalid(p, &c->range)) in mls_context_isvalid()
206 * User must be authorized for the MLS range. in mls_context_isvalid()
211 if (!mls_range_contains(usrdatum->range, c->range)) in mls_context_isvalid()
212 return 0; /* user may not be associated with range */ in mls_context_isvalid()
274 * If we're dealing with a range, figure out where the two parts in mls_context_to_sid()
275 * of the range begin. in mls_context_to_sid()
284 /* For each part of the range: */ in mls_context_to_sid()
298 context->range.level[l].sens = levdatum->level->sens; in mls_context_to_sid()
307 /* Separate into range if exists */ in mls_context_to_sid()
318 rc = ebitmap_set_bit(&context->range.level[l].cat, in mls_context_to_sid()
323 /* If range, set all categories in range */ in mls_context_to_sid()
335 rc = ebitmap_set_bit(&context->range.level[l].cat, i, 1); in mls_context_to_sid()
342 /* If we didn't see a '-', the range start is also the range end. */ in mls_context_to_sid()
344 context->range.level[1].sens = context->range.level[0].sens; in mls_context_to_sid()
345 rc = ebitmap_cpy(&context->range.level[1].cat, in mls_context_to_sid()
346 &context->range.level[0].cat); in mls_context_to_sid()
382 * Copies the MLS range `range' into `context'.
385 struct mls_range *range) in mls_range_set() argument
389 /* Copy the MLS range into the context */ in mls_range_set()
391 context->range.level[l].sens = range->level[l].sens; in mls_range_set()
392 rc = ebitmap_cpy(&context->range.level[l].cat, in mls_range_set()
393 &range->level[l].cat); in mls_range_set()
406 struct mls_level *fromcon_sen = &(fromcon->range.level[0]); in mls_setup_user_range()
407 struct mls_level *fromcon_clr = &(fromcon->range.level[1]); in mls_setup_user_range()
408 struct mls_level *user_low = &(user->range.level[0]); in mls_setup_user_range()
409 struct mls_level *user_clr = &(user->range.level[1]); in mls_setup_user_range()
411 struct mls_level *usercon_sen = &(usercon->range.level[0]); in mls_setup_user_range()
412 struct mls_level *usercon_clr = &(usercon->range.level[1]); in mls_setup_user_range()
461 oldc->range.level[l].sens - 1); in mls_convert_context()
467 newc->range.level[l].sens = levdatum->level->sens; in mls_convert_context()
469 ebitmap_for_each_positive_bit(&oldc->range.level[l].cat, in mls_convert_context()
477 rc = ebitmap_set_bit(&newc->range.level[l].cat, in mls_convert_context()
505 /* Look for a range transition rule. */ in mls_compute_sid()
571 secattr->attr.mls.lvl = context->range.level[0].sens - 1; in mls_export_netlbl_lvl()
593 context->range.level[0].sens = secattr->attr.mls.lvl + 1; in mls_import_netlbl_lvl()
594 context->range.level[1].sens = context->range.level[0].sens; in mls_import_netlbl_lvl()
617 rc = ebitmap_netlbl_export(&context->range.level[0].cat, in mls_export_netlbl_cat()
647 rc = ebitmap_netlbl_import(&context->range.level[0].cat, in mls_import_netlbl_cat()
651 memcpy(&context->range.level[1].cat, &context->range.level[0].cat, in mls_import_netlbl_cat()
652 sizeof(context->range.level[0].cat)); in mls_import_netlbl_cat()
657 ebitmap_destroy(&context->range.level[0].cat); in mls_import_netlbl_cat()