Lines Matching refs:mpc

317 mac_policy_getlabeled(struct mac_policy_conf *mpc)
322 if (mpc->mpc_ops->mpo_ ## method != NULL) \
359 struct mac_policy_conf *mpc;
365 LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) {
366 mac_labeled |= mac_policy_getlabeled(mpc);
369 LIST_FOREACH(mpc, &mac_policy_list, mpc_list) {
370 mac_labeled |= mac_policy_getlabeled(mpc);
376 mac_policy_register(struct mac_policy_conf *mpc)
396 !(mpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_UNLOADOK));
400 if (strcmp(tmpc->mpc_name, mpc->mpc_name) == 0) {
407 if (strcmp(tmpc->mpc_name, mpc->mpc_name) == 0) {
413 if (mpc->mpc_field_off != NULL) {
421 *mpc->mpc_field_off = slot;
423 mpc->mpc_runtime_flags |= MPC_RUNTIME_FLAG_REGISTERED;
432 LIST_INSERT_HEAD(&mac_static_policy_list, mpc, mpc_list);
434 LIST_INSERT_HEAD(&mac_policy_list, mpc, mpc_list);
443 if (mpc->mpc_ops->mpo_init != NULL)
444 (*(mpc->mpc_ops->mpo_init))(mpc);
447 SDT_PROBE1(mac, , policy, register, mpc);
448 printf("Security policy loaded: %s (%s)\n", mpc->mpc_fullname,
449 mpc->mpc_name);
457 mac_policy_unregister(struct mac_policy_conf *mpc)
465 if ((mpc->mpc_runtime_flags & MPC_RUNTIME_FLAG_REGISTERED) == 0) {
473 if (mpc->mpc_field_off != NULL) {
482 if ((mpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_UNLOADOK) == 0) {
486 if (mpc->mpc_ops->mpo_destroy != NULL)
487 (*(mpc->mpc_ops->mpo_destroy))(mpc);
489 LIST_REMOVE(mpc, mpc_list);
490 mpc->mpc_runtime_flags &= ~MPC_RUNTIME_FLAG_REGISTERED;
494 SDT_PROBE1(mac, , policy, unregister, mpc);
495 printf("Security policy unload: %s (%s)\n", mpc->mpc_fullname,
496 mpc->mpc_name);
507 struct mac_policy_conf *mpc;
511 mpc = (struct mac_policy_conf *) data;
520 SDT_PROBE2(mac, , policy, modevent, type, mpc);
523 if (mpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_NOTLATE &&
526 "after booting\n", mpc->mpc_name);
530 error = mac_policy_register(mpc);
534 if ((mpc->mpc_runtime_flags & MPC_RUNTIME_FLAG_REGISTERED)
536 error = mac_policy_unregister(mpc);