Lines Matching refs:mpc

318 mac_policy_getlabeled(struct mac_policy_conf *mpc)
323 if (mpc->mpc_ops->mpo_ ## method != NULL) \
360 struct mac_policy_conf *mpc;
366 LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) {
367 mac_labeled |= mac_policy_getlabeled(mpc);
370 LIST_FOREACH(mpc, &mac_policy_list, mpc_list) {
371 mac_labeled |= mac_policy_getlabeled(mpc);
377 mac_policy_register(struct mac_policy_conf *mpc)
397 !(mpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_UNLOADOK));
401 if (strcmp(tmpc->mpc_name, mpc->mpc_name) == 0) {
408 if (strcmp(tmpc->mpc_name, mpc->mpc_name) == 0) {
414 if (mpc->mpc_field_off != NULL) {
422 *mpc->mpc_field_off = slot;
424 mpc->mpc_runtime_flags |= MPC_RUNTIME_FLAG_REGISTERED;
433 LIST_INSERT_HEAD(&mac_static_policy_list, mpc, mpc_list);
435 LIST_INSERT_HEAD(&mac_policy_list, mpc, mpc_list);
444 if (mpc->mpc_ops->mpo_init != NULL)
445 (*(mpc->mpc_ops->mpo_init))(mpc);
448 SDT_PROBE(mac, kernel, policy, register, mpc, 0, 0, 0, 0);
449 printf("Security policy loaded: %s (%s)\n", mpc->mpc_fullname,
450 mpc->mpc_name);
458 mac_policy_unregister(struct mac_policy_conf *mpc)
466 if ((mpc->mpc_runtime_flags & MPC_RUNTIME_FLAG_REGISTERED) == 0) {
474 if (mpc->mpc_field_off != NULL) {
483 if ((mpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_UNLOADOK) == 0) {
487 if (mpc->mpc_ops->mpo_destroy != NULL)
488 (*(mpc->mpc_ops->mpo_destroy))(mpc);
490 LIST_REMOVE(mpc, mpc_list);
491 mpc->mpc_runtime_flags &= ~MPC_RUNTIME_FLAG_REGISTERED;
495 SDT_PROBE(mac, kernel, policy, unregister, mpc, 0, 0, 0, 0);
496 printf("Security policy unload: %s (%s)\n", mpc->mpc_fullname,
497 mpc->mpc_name);
508 struct mac_policy_conf *mpc;
512 mpc = (struct mac_policy_conf *) data;
521 SDT_PROBE(mac, kernel, policy, modevent, type, mpc, 0, 0, 0);
524 if (mpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_NOTLATE &&
527 "after booting\n", mpc->mpc_name);
531 error = mac_policy_register(mpc);
535 if ((mpc->mpc_runtime_flags & MPC_RUNTIME_FLAG_REGISTERED)
537 error = mac_policy_unregister(mpc);