diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2003-03-26 15:12:03 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2003-03-26 15:12:03 +0000 |
| commit | 5e7ce4785f43ef1e01c5a85bc10c9ddba60076d7 (patch) | |
| tree | edbc245cbca8647afd1e19854b10c0489fdc26fe /sys/security/mac/mac_framework.c | |
| parent | 1d8aed2b21e40bcac35f402ce180940df88fb1ef (diff) | |
Notes
Diffstat (limited to 'sys/security/mac/mac_framework.c')
| -rw-r--r-- | sys/security/mac/mac_framework.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c index 6b2e6534e10f..17b37d8d1345 100644 --- a/sys/security/mac/mac_framework.c +++ b/sys/security/mac/mac_framework.c @@ -697,15 +697,23 @@ mac_init_ifnet(struct ifnet *ifp) mac_init_ifnet_label(&ifp->if_label); } -void -mac_init_ipq(struct ipq *ipq) +int +mac_init_ipq(struct ipq *ipq, int flag) { + int error; mac_init_label(&ipq->ipq_label); - MAC_PERFORM(init_ipq_label, &ipq->ipq_label); + + MAC_CHECK(init_ipq_label, &ipq->ipq_label, flag); + if (error) { + MAC_PERFORM(destroy_ipq_label, &ipq->ipq_label); + mac_destroy_label(&ipq->ipq_label); + } #ifdef MAC_DEBUG - atomic_add_int(&nmacipqs, 1); + if (error == 0) + atomic_add_int(&nmacipqs, 1); #endif + return (error); } int |
