From e83d3091807de4060c0f7654609c0ba97c607698 Mon Sep 17 00:00:00 2001 From: Erwin Lansing Date: Mon, 24 Feb 2014 13:57:07 +0000 Subject: Vendor import of BIND 9.8.7 Approved by: delphij (mentor, implicit) Sponsored by: DK Hostmaster A/S --- lib/bind9/api | 2 +- lib/bind9/check.c | 34 ++++++++++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 3 deletions(-) (limited to 'lib/bind9') diff --git a/lib/bind9/api b/lib/bind9/api index 99f8d317f469..0e65c9f9b1d4 100644 --- a/lib/bind9/api +++ b/lib/bind9/api @@ -5,5 +5,5 @@ # 9.9: 90-109 # 9.9-sub: 130-139 LIBINTERFACE = 80 -LIBREVISION = 8 +LIBREVISION = 9 LIBAGE = 0 diff --git a/lib/bind9/check.c b/lib/bind9/check.c index 7c975c9846af..0488e14d320b 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2001-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -1131,7 +1132,7 @@ validate_masters(const cfg_obj_t *obj, const cfg_obj_t *config, void *ptr; DE_CONST(stack, ptr); - memcpy(new, stack, oldsize); + memmove(new, stack, oldsize); isc_mem_put(mctx, ptr, oldsize); } stack = new; @@ -1700,6 +1701,35 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions, } } + /* + * Warn if key-directory doesn't exist + */ + obj = NULL; + tresult = cfg_map_get(zoptions, "key-directory", &obj); + if (tresult == ISC_R_SUCCESS) { + const char *dir = cfg_obj_asstring(obj); + tresult = isc_file_isdirectory(dir); + switch (tresult) { + case ISC_R_SUCCESS: + break; + case ISC_R_FILENOTFOUND: + cfg_obj_log(obj, logctx, ISC_LOG_WARNING, + "key-directory: '%s' does not exist", + dir); + break; + case ISC_R_INVALIDFILE: + cfg_obj_log(obj, logctx, ISC_LOG_WARNING, + "key-directory: '%s' is not a directory", + dir); + break; + default: + cfg_obj_log(obj, logctx, ISC_LOG_WARNING, + "key-directory: '%s' %s", + dir, isc_result_totext(tresult)); + result = tresult; + } + } + /* * Check various options. */ -- cgit v1.2.3