Restrict functionality when ACLs are misconfigured.
authorMark Michelson <mmichelson@digium.com>
Tue, 28 Apr 2015 22:00:37 +0000 (17:00 -0500)
committerMark Michelson <mmichelson@digium.com>
Thu, 30 Apr 2015 15:43:51 +0000 (10:43 -0500)
commit11ffcf662f6b19eb0e9d5f8914d379ebef0177c4
treea2727599061f560cce4900094e4854364c9c7add
parent57cbb4bc8dda4cf4939f029e60290e3335a82c05
Restrict functionality when ACLs are misconfigured.

This patch has two main purposes:

1) Improve warning messages when ACLs are configured improperly.
2) Prevent misconfigured ACLs from allowing potentially unwanted
traffic.

To acomplish point (2) in most cases, whatever configuration object that
the ACL belonged to was not allowed to load.

The one exception is res_pjsip_acl. In that case, ACLs are their own
configuration object. Furthermore, the module loading code has no
indication that a ACL configuration had a failure. So the tactic taken
here is to create an ACL that just blocks everything.

ASTERISK-24969
Reported by Corey Farrell

Change-Id: I2ebcb6959cefad03cea4d81401be946203fcacae
channels/chan_iax2.c
channels/chan_mgcp.c
channels/chan_sip.c
channels/chan_skinny.c
channels/chan_unistim.c
main/acl.c
main/manager.c
res/res_pjsip_acl.c