diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-05-01 21:05:40 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-05-01 21:05:40 +0000 |
commit | 7176eb1b5ec1d305e92a20811e862b0ffe42c756 (patch) | |
tree | 171b16d02dd5723061d2f482274cbf7792e8e355 /sys/security/mac/mac_inet6.c | |
parent | 50b57c0fb59d547c4f1cd4c469029d22b9293a3d (diff) | |
download | FreeBSD-src-7176eb1b5ec1d305e92a20811e862b0ffe42c756.zip FreeBSD-src-7176eb1b5ec1d305e92a20811e862b0ffe42c756.tar.gz |
Rename MAC Framework-internal macros used to invoke policy entry points:
MAC_BOOLEAN -> MAC_POLICY_BOOLEAN
MAC_BOOLEAN_NOSLEEP -> MAC_POLICY_BOOLEANN_NOSLEEP
MAC_CHECK -> MAC_POLICY_CHECK
MAC_CHECK_NOSLEEP -> MAC_POLICY_CHECK_NOSLEEP
MAC_EXTERNALIZE -> MAC_POLICY_EXTERNALIZE
MAC_GRANT -> MAC_POLICY_GRANT
MAC_GRANT_NOSLEEP -> MAC_POLICY_GRANT_NOSLEEP
MAC_INTERNALIZE -> MAC_POLICY_INTERNALIZE
MAC_PERFORM -> MAC_POLICY_PERFORM_CHECK
MAC_PERFORM_NOSLEEP -> MAC_POLICY_PERFORM_NOSLEEP
This frees up those macro names for use in wrapping calls into the MAC
Framework from the remainder of the kernel.
Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/security/mac/mac_inet6.c')
-rw-r--r-- | sys/security/mac/mac_inet6.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/sys/security/mac/mac_inet6.c b/sys/security/mac/mac_inet6.c index f804fe3..be26a9d 100644 --- a/sys/security/mac/mac_inet6.c +++ b/sys/security/mac/mac_inet6.c @@ -71,11 +71,11 @@ mac_ip6q_label_alloc(int flag) return (NULL); if (flag & M_WAITOK) - MAC_CHECK(ip6q_init_label, label, flag); + MAC_POLICY_CHECK(ip6q_init_label, label, flag); else - MAC_CHECK_NOSLEEP(ip6q_init_label, label, flag); + MAC_POLICY_CHECK_NOSLEEP(ip6q_init_label, label, flag); if (error) { - MAC_PERFORM_NOSLEEP(ip6q_destroy_label, label); + MAC_POLICY_PERFORM_NOSLEEP(ip6q_destroy_label, label); mac_labelzone_free(label); return (NULL); } @@ -99,7 +99,7 @@ static void mac_ip6q_label_free(struct label *label) { - MAC_PERFORM_NOSLEEP(ip6q_destroy_label, label); + MAC_POLICY_PERFORM_NOSLEEP(ip6q_destroy_label, label); mac_labelzone_free(label); } @@ -120,7 +120,8 @@ mac_ip6q_reassemble(struct ip6q *q6, struct mbuf *m) label = mac_mbuf_to_label(m); - MAC_PERFORM_NOSLEEP(ip6q_reassemble, q6, q6->ip6q_label, m, label); + MAC_POLICY_PERFORM_NOSLEEP(ip6q_reassemble, q6, q6->ip6q_label, m, + label); } void @@ -130,7 +131,8 @@ mac_ip6q_create(struct mbuf *m, struct ip6q *q6) label = mac_mbuf_to_label(m); - MAC_PERFORM_NOSLEEP(ip6q_create, m, label, q6, q6->ip6q_label); + MAC_POLICY_PERFORM_NOSLEEP(ip6q_create, m, label, q6, + q6->ip6q_label); } int @@ -142,7 +144,8 @@ mac_ip6q_match(struct mbuf *m, struct ip6q *q6) label = mac_mbuf_to_label(m); result = 1; - MAC_BOOLEAN_NOSLEEP(ip6q_match, &&, m, label, q6, q6->ip6q_label); + MAC_POLICY_BOOLEAN_NOSLEEP(ip6q_match, &&, m, label, q6, + q6->ip6q_label); return (result); } @@ -154,7 +157,8 @@ mac_ip6q_update(struct mbuf *m, struct ip6q *q6) label = mac_mbuf_to_label(m); - MAC_PERFORM_NOSLEEP(ip6q_update, m, label, q6, q6->ip6q_label); + MAC_POLICY_PERFORM_NOSLEEP(ip6q_update, m, label, q6, + q6->ip6q_label); } void @@ -164,6 +168,6 @@ mac_netinet6_nd6_send(struct ifnet *ifp, struct mbuf *m) mlabel = mac_mbuf_to_label(m); - MAC_PERFORM_NOSLEEP(netinet6_nd6_send, ifp, ifp->if_label, m, + MAC_POLICY_PERFORM_NOSLEEP(netinet6_nd6_send, ifp, ifp->if_label, m, mlabel); } |