Lines Matching full:range

48 		u32 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()
275 * If we're dealing with a range, figure out where the two parts in mls_context_to_sid()
276 * of the range begin. in mls_context_to_sid()
285 /* For each part of the range: */ in mls_context_to_sid()
299 context->range.level[l].sens = levdatum->level->sens; in mls_context_to_sid()
308 /* Separate into range if exists */ in mls_context_to_sid()
319 rc = ebitmap_set_bit(&context->range.level[l].cat, in mls_context_to_sid()
324 /* If range, set all categories in range */ in mls_context_to_sid()
336 rc = ebitmap_set_bit(&context->range.level[l].cat, i, 1); in mls_context_to_sid()
343 /* If we didn't see a '-', the range start is also the range end. */ in mls_context_to_sid()
345 context->range.level[1].sens = context->range.level[0].sens; in mls_context_to_sid()
346 rc = ebitmap_cpy(&context->range.level[1].cat, in mls_context_to_sid()
347 &context->range.level[0].cat); in mls_context_to_sid()
383 * Copies the MLS range `range' into `context'.
386 struct mls_range *range) in mls_range_set() argument
390 /* Copy the MLS range into the context */ in mls_range_set()
392 context->range.level[l].sens = range->level[l].sens; in mls_range_set()
393 rc = ebitmap_cpy(&context->range.level[l].cat, in mls_range_set()
394 &range->level[l].cat); in mls_range_set()
407 struct mls_level *fromcon_sen = &(fromcon->range.level[0]); in mls_setup_user_range()
408 struct mls_level *fromcon_clr = &(fromcon->range.level[1]); in mls_setup_user_range()
409 struct mls_level *user_low = &(user->range.level[0]); in mls_setup_user_range()
410 struct mls_level *user_clr = &(user->range.level[1]); in mls_setup_user_range()
412 struct mls_level *usercon_sen = &(usercon->range.level[0]); in mls_setup_user_range()
413 struct mls_level *usercon_clr = &(usercon->range.level[1]); in mls_setup_user_range()
463 oldc->range.level[l].sens - 1); in mls_convert_context()
469 newc->range.level[l].sens = levdatum->level->sens; in mls_convert_context()
471 ebitmap_for_each_positive_bit(&oldc->range.level[l].cat, in mls_convert_context()
479 rc = ebitmap_set_bit(&newc->range.level[l].cat, in mls_convert_context()
507 /* Look for a range transition rule. */ in mls_compute_sid()
573 secattr->attr.mls.lvl = context->range.level[0].sens - 1; in mls_export_netlbl_lvl()
595 context->range.level[0].sens = secattr->attr.mls.lvl + 1; in mls_import_netlbl_lvl()
596 context->range.level[1].sens = context->range.level[0].sens; in mls_import_netlbl_lvl()
619 rc = ebitmap_netlbl_export(&context->range.level[0].cat, in mls_export_netlbl_cat()
649 rc = ebitmap_netlbl_import(&context->range.level[0].cat, in mls_import_netlbl_cat()
653 memcpy(&context->range.level[1].cat, &context->range.level[0].cat, in mls_import_netlbl_cat()
654 sizeof(context->range.level[0].cat)); in mls_import_netlbl_cat()
659 ebitmap_destroy(&context->range.level[0].cat); in mls_import_netlbl_cat()