diff options
author | rwatson <rwatson@FreeBSD.org> | 2007-10-28 17:55:57 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2007-10-28 17:55:57 +0000 |
commit | 54102acdd33a82e9e30587840fa37add70eb6a1c (patch) | |
tree | ea9e4b5af6e13229c36a6b366ba45e4eb67ff102 /sys/security | |
parent | 369fd04f480478bfb9d2cb1566ec0189185a020e (diff) | |
download | FreeBSD-src-54102acdd33a82e9e30587840fa37add70eb6a1c.zip FreeBSD-src-54102acdd33a82e9e30587840fa37add70eb6a1c.tar.gz |
Garbage collect mac_mbuf_create_multicast_encap TrustedBSD MAC Framework
entry point, which is no longer required now that we don't support
old-style multicast tunnels. This removes the last mbuf object class
entry point that isn't init/copy/destroy.
Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/security')
-rw-r--r-- | sys/security/mac/mac_framework.h | 2 | ||||
-rw-r--r-- | sys/security/mac/mac_net.c | 15 | ||||
-rw-r--r-- | sys/security/mac/mac_policy.h | 5 | ||||
-rw-r--r-- | sys/security/mac_biba/mac_biba.c | 14 | ||||
-rw-r--r-- | sys/security/mac_lomac/mac_lomac.c | 14 | ||||
-rw-r--r-- | sys/security/mac_mls/mac_mls.c | 14 | ||||
-rw-r--r-- | sys/security/mac_stub/mac_stub.c | 9 | ||||
-rw-r--r-- | sys/security/mac_test/mac_test.c | 14 |
8 files changed, 0 insertions, 87 deletions
diff --git a/sys/security/mac/mac_framework.h b/sys/security/mac/mac_framework.h index 3ea3490..f3d41df 100644 --- a/sys/security/mac/mac_framework.h +++ b/sys/security/mac/mac_framework.h @@ -152,8 +152,6 @@ int mac_kld_check_load(struct ucred *cred, struct vnode *vp); int mac_kld_check_stat(struct ucred *cred); void mac_mbuf_copy(struct mbuf *, struct mbuf *); -void mac_mbuf_create_multicast_encap(struct mbuf *m, struct ifnet *ifp, - struct mbuf *mnew); int mac_mbuf_init(struct mbuf *, int); void mac_mbuf_tag_copy(struct m_tag *, struct m_tag *); diff --git a/sys/security/mac/mac_net.c b/sys/security/mac/mac_net.c index c451a29..0b4ec4e 100644 --- a/sys/security/mac/mac_net.c +++ b/sys/security/mac/mac_net.c @@ -319,21 +319,6 @@ mac_ifnet_create_mbuf(struct ifnet *ifp, struct mbuf *m) MAC_IFNET_UNLOCK(ifp); } -void -mac_mbuf_create_multicast_encap(struct mbuf *m, struct ifnet *ifp, - struct mbuf *mnew) -{ - struct label *mlabel, *mnewlabel; - - mlabel = mac_mbuf_to_label(m); - mnewlabel = mac_mbuf_to_label(mnew); - - MAC_IFNET_LOCK(ifp); - MAC_PERFORM(mbuf_create_multicast_encap, m, mlabel, ifp, - ifp->if_label, mnew, mnewlabel); - MAC_IFNET_UNLOCK(ifp); -} - int mac_bpfdesc_check_receive(struct bpf_d *d, struct ifnet *ifp) { diff --git a/sys/security/mac/mac_policy.h b/sys/security/mac/mac_policy.h index 8f26818..3d494db 100644 --- a/sys/security/mac/mac_policy.h +++ b/sys/security/mac/mac_policy.h @@ -221,10 +221,6 @@ typedef int (*mpo_kld_check_stat_t)(struct ucred *cred); typedef void (*mpo_mbuf_copy_label_t)(struct label *src, struct label *dest); -typedef void (*mpo_mbuf_create_multicast_encap_t)(struct mbuf *m, - struct label *mlabel, struct ifnet *ifp, - struct label *ifplabel, struct mbuf *mnew, - struct label *mnewlabel); typedef void (*mpo_mbuf_destroy_label_t)(struct label *label); typedef int (*mpo_mbuf_init_label_t)(struct label *label, int flag); @@ -692,7 +688,6 @@ struct mac_policy_ops { mpo_kld_check_stat_t mpo_kld_check_stat; mpo_mbuf_copy_label_t mpo_mbuf_copy_label; - mpo_mbuf_create_multicast_encap_t mpo_mbuf_create_multicast_encap; mpo_mbuf_destroy_label_t mpo_mbuf_destroy_label; mpo_mbuf_init_label_t mpo_mbuf_init_label; diff --git a/sys/security/mac_biba/mac_biba.c b/sys/security/mac_biba/mac_biba.c index 5702c01..72f9745 100644 --- a/sys/security/mac_biba/mac_biba.c +++ b/sys/security/mac_biba/mac_biba.c @@ -1291,19 +1291,6 @@ biba_ifnet_create_mbuf(struct ifnet *ifp, struct label *ifplabel, biba_copy_effective(source, dest); } -static void -biba_mbuf_create_multicast_encap(struct mbuf *m, struct label *mlabel, - struct ifnet *ifp, struct label *ifplabel, struct mbuf *mnew, - struct label *mnewlabel) -{ - struct mac_biba *source, *dest; - - source = SLOT(mlabel); - dest = SLOT(mnewlabel); - - biba_copy_effective(source, dest); -} - static int biba_ipq_match(struct mbuf *m, struct label *mlabel, struct ipq *ipq, struct label *ipqlabel) @@ -3367,7 +3354,6 @@ static struct mac_policy_ops mac_biba_ops = .mpo_inpcb_create_mbuf = biba_inpcb_create_mbuf, .mpo_bpfdesc_create_mbuf = biba_bpfdesc_create_mbuf, .mpo_ifnet_create_mbuf = biba_ifnet_create_mbuf, - .mpo_mbuf_create_multicast_encap = biba_mbuf_create_multicast_encap, .mpo_ipq_match = biba_ipq_match, .mpo_ifnet_relabel = biba_ifnet_relabel, .mpo_ipq_update = biba_ipq_update, diff --git a/sys/security/mac_lomac/mac_lomac.c b/sys/security/mac_lomac/mac_lomac.c index 796badc..6ee206a 100644 --- a/sys/security/mac_lomac/mac_lomac.c +++ b/sys/security/mac_lomac/mac_lomac.c @@ -1355,19 +1355,6 @@ lomac_ifnet_create_mbuf(struct ifnet *ifp, struct label *ifplabel, lomac_copy_single(source, dest); } -static void -lomac_mbuf_create_multicast_encap(struct mbuf *m, struct label *mlabel, - struct ifnet *ifp, struct label *ifplabel, struct mbuf *mnew, - struct label *mnewlabel) -{ - struct mac_lomac *source, *dest; - - source = SLOT(mlabel); - dest = SLOT(mnewlabel); - - lomac_copy_single(source, dest); -} - static int lomac_ipq_match(struct mbuf *m, struct label *mlabel, struct ipq *ipq, struct label *ipqlabel) @@ -2925,7 +2912,6 @@ static struct mac_policy_ops lomac_ops = .mpo_inpcb_create_mbuf = lomac_inpcb_create_mbuf, .mpo_bpfdesc_create_mbuf = lomac_bpfdesc_create_mbuf, .mpo_ifnet_create_mbuf = lomac_ifnet_create_mbuf, - .mpo_mbuf_create_multicast_encap = lomac_mbuf_create_multicast_encap, .mpo_ipq_match = lomac_ipq_match, .mpo_ifnet_relabel = lomac_ifnet_relabel, .mpo_ipq_update = lomac_ipq_update, diff --git a/sys/security/mac_mls/mac_mls.c b/sys/security/mac_mls/mac_mls.c index 701eb6d..8ead381 100644 --- a/sys/security/mac_mls/mac_mls.c +++ b/sys/security/mac_mls/mac_mls.c @@ -1213,19 +1213,6 @@ mls_ifnet_create_mbuf(struct ifnet *ifp, struct label *ifplabel, mls_copy_effective(source, dest); } -static void -mls_mbuf_create_multicast_encap(struct mbuf *m, struct label *mlabel, - struct ifnet *ifp, struct label *ifplabel, struct mbuf *mnew, - struct label *mnewlabel) -{ - struct mac_mls *source, *dest; - - source = SLOT(mlabel); - dest = SLOT(mnewlabel); - - mls_copy_effective(source, dest); -} - static int mls_ipq_match(struct mbuf *m, struct label *mlabel, struct ipq *ipq, struct label *ipqlabel) @@ -2994,7 +2981,6 @@ static struct mac_policy_ops mls_ops = .mpo_inpcb_create_mbuf = mls_inpcb_create_mbuf, .mpo_bpfdesc_create_mbuf = mls_bpfdesc_create_mbuf, .mpo_ifnet_create_mbuf = mls_ifnet_create_mbuf, - .mpo_mbuf_create_multicast_encap = mls_mbuf_create_multicast_encap, .mpo_ipq_match = mls_ipq_match, .mpo_ifnet_relabel = mls_ifnet_relabel, .mpo_ipq_update = mls_ipq_update, diff --git a/sys/security/mac_stub/mac_stub.c b/sys/security/mac_stub/mac_stub.c index 687378f..2cd3fb9 100644 --- a/sys/security/mac_stub/mac_stub.c +++ b/sys/security/mac_stub/mac_stub.c @@ -419,14 +419,6 @@ stub_ifnet_create_mbuf(struct ifnet *ifp, struct label *ifplabel, } static void -stub_mbuf_create_multicast_encap(struct mbuf *m, struct label *mlabel, - struct ifnet *ifp, struct label *ifplabel, struct mbuf *mnew, - struct label *mnewlabel) -{ - -} - -static void stub_netatalk_aarp_send(struct ifnet *ifp, struct label *iflpabel, struct mbuf *m, struct label *mlabel) { @@ -1551,7 +1543,6 @@ static struct mac_policy_ops stub_ops = .mpo_inpcb_create_mbuf = stub_inpcb_create_mbuf, .mpo_bpfdesc_create_mbuf = stub_bpfdesc_create_mbuf, .mpo_ifnet_create_mbuf = stub_ifnet_create_mbuf, - .mpo_mbuf_create_multicast_encap = stub_mbuf_create_multicast_encap, .mpo_netatalk_aarp_send = stub_netatalk_aarp_send, .mpo_netinet_arp_send = stub_netinet_arp_send, .mpo_netinet_firewall_reply = stub_netinet_firewall_reply, diff --git a/sys/security/mac_test/mac_test.c b/sys/security/mac_test/mac_test.c index b0d4ea8..39dc842 100644 --- a/sys/security/mac_test/mac_test.c +++ b/sys/security/mac_test/mac_test.c @@ -1037,19 +1037,6 @@ test_ifnet_create_mbuf(struct ifnet *ifp, struct label *ifplabel, COUNTER_INC(ifnet_create_mbuf); } -COUNTER_DECL(mbuf_create_multicast_encap); -static void -test_mbuf_create_multicast_encap(struct mbuf *oldmbuf, - struct label *oldmbuflabel, struct ifnet *ifp, struct label *ifplabel, - struct mbuf *newmbuf, struct label *newmbuflabel) -{ - - LABEL_CHECK(oldmbuflabel, MAGIC_MBUF); - LABEL_CHECK(ifplabel, MAGIC_IFNET); - LABEL_CHECK(newmbuflabel, MAGIC_MBUF); - COUNTER_INC(mbuf_create_multicast_encap); -} - COUNTER_DECL(ipq_match); static int test_ipq_match(struct mbuf *fragment, struct label *fragmentlabel, @@ -2720,7 +2707,6 @@ static struct mac_policy_ops test_ops = .mpo_inpcb_create_mbuf = test_inpcb_create_mbuf, .mpo_bpfdesc_create_mbuf = test_bpfdesc_create_mbuf, .mpo_ifnet_create_mbuf = test_ifnet_create_mbuf, - .mpo_mbuf_create_multicast_encap = test_mbuf_create_multicast_encap, .mpo_ipq_match = test_ipq_match, .mpo_netatalk_aarp_send = test_netatalk_aarp_send, .mpo_netinet_arp_send = test_netinet_arp_send, |