From 9727d74064f535408bda75fd22eb0ac690e8d9c3 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 13 Feb 2002 03:43:09 +0000 Subject: [PATCH] report line of previous acl definition. --- lib/bind9/check.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/bind9/check.c b/lib/bind9/check.c index 6265e442f2..1d514655e3 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: check.c,v 1.21 2002/02/12 13:17:23 marka Exp $ */ +/* $Id: check.c,v 1.22 2002/02/13 03:43:09 marka Exp $ */ #include @@ -630,11 +630,18 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) { name = cfg_obj_asstring(cfg_tuple_get(acl2, "name")); if (strcasecmp(aclname, name) == 0) { + const char *file = cfg_obj_file(acl); + unsigned int line = cfg_obj_line(acl); + + if (file == NULL) + file = ""; + cfg_obj_log(acl2, logctx, ISC_LOG_ERROR, "attempt to redefine " - "acl '%s'", name); + "acl '%s' previous " + "definition: %s:%u", + name, file, line); result = ISC_R_FAILURE; - break; } } }