MCPcopy Create free account
hub / github.com/F-Stack/f-stack / biba_set_range

Function biba_set_range

freebsd/security/mac_biba/mac_biba.c:429–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427}
428
429static void
430biba_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
448static void
449biba_set_effective(struct mac_biba *mb, u_short type, u_short grade,

Callers 4

biba_cred_associate_nfsdFunction · 0.85
biba_cred_create_initFunction · 0.85
biba_cred_create_swapperFunction · 0.85
biba_ifnet_createFunction · 0.85

Calls 1

memcpyFunction · 0.50

Tested by

no test coverage detected