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

Function mac_policy_update

freebsd/security/mac/mac_framework.c:387–406  ·  view source on GitHub ↗

* When policies are loaded or unloaded, walk the list of registered policies * and built mac_labeled, a bitmask representing the union of all objects * requiring labels across all policies. */

Source from the content-addressed store, hash-verified

385 * requiring labels across all policies.
386 */
387static void
388mac_policy_update(void)
389{
390 struct mac_policy_conf *mpc;
391
392 mac_policy_xlock_assert();
393
394 mac_labeled = 0;
395 mac_policy_count = 0;
396 LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) {
397 mac_labeled |= mac_policy_getlabeled(mpc);
398 mac_policy_count++;
399 }
400 LIST_FOREACH(mpc, &mac_policy_list, mpc_list) {
401 mac_labeled |= mac_policy_getlabeled(mpc);
402 mac_policy_count++;
403 }
404
405 cache_fast_lookup_enabled_recalc();
406}
407
408/*
409 * There are frequently used code paths which check for rarely installed

Callers 2

mac_policy_registerFunction · 0.85
mac_policy_unregisterFunction · 0.85

Calls 3

mac_policy_xlock_assertFunction · 0.85
mac_policy_getlabeledFunction · 0.85

Tested by

no test coverage detected