* 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. */
| 385 | * requiring labels across all policies. |
| 386 | */ |
| 387 | static void |
| 388 | mac_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 |
no test coverage detected