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

Function mls_set_range

freebsd/security/mac_mls/mac_mls.c:394–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392}
393
394static void
395mls_set_range(struct mac_mls *mm, u_short typelow, u_short levellow,
396 u_char *compartmentslow, u_short typehigh, u_short levelhigh,
397 u_char *compartmentshigh)
398{
399
400 mm->mm_rangelow.mme_type = typelow;
401 mm->mm_rangelow.mme_level = levellow;
402 if (compartmentslow != NULL)
403 memcpy(mm->mm_rangelow.mme_compartments, compartmentslow,
404 sizeof(mm->mm_rangelow.mme_compartments));
405 mm->mm_rangehigh.mme_type = typehigh;
406 mm->mm_rangehigh.mme_level = levelhigh;
407 if (compartmentshigh != NULL)
408 memcpy(mm->mm_rangehigh.mme_compartments, compartmentshigh,
409 sizeof(mm->mm_rangehigh.mme_compartments));
410 mm->mm_flags |= MAC_MLS_FLAG_RANGE;
411}
412
413static void
414mls_set_effective(struct mac_mls *mm, u_short type, u_short level,

Callers 4

mls_cred_associate_nfsdFunction · 0.85
mls_cred_create_initFunction · 0.85
mls_cred_create_swapperFunction · 0.85
mls_ifnet_createFunction · 0.85

Calls 1

memcpyFunction · 0.50

Tested by

no test coverage detected