| 427 | } |
| 428 | |
| 429 | static void |
| 430 | biba_set_range(struct mac_biba *mb, u_short typelow, u_short gradelow, |
| 431 | u_char *compartmentslow, u_short typehigh, u_short gradehigh, |
| 432 | u_char *compartmentshigh) |
| 433 | { |
| 434 | |
| 435 | mb->mb_rangelow.mbe_type = typelow; |
| 436 | mb->mb_rangelow.mbe_grade = gradelow; |
| 437 | if (compartmentslow != NULL) |
| 438 | memcpy(mb->mb_rangelow.mbe_compartments, compartmentslow, |
| 439 | sizeof(mb->mb_rangelow.mbe_compartments)); |
| 440 | mb->mb_rangehigh.mbe_type = typehigh; |
| 441 | mb->mb_rangehigh.mbe_grade = gradehigh; |
| 442 | if (compartmentshigh != NULL) |
| 443 | memcpy(mb->mb_rangehigh.mbe_compartments, compartmentshigh, |
| 444 | sizeof(mb->mb_rangehigh.mbe_compartments)); |
| 445 | mb->mb_flags |= MAC_BIBA_FLAG_RANGE; |
| 446 | } |
| 447 | |
| 448 | static void |
| 449 | biba_set_effective(struct mac_biba *mb, u_short type, u_short grade, |
no test coverage detected