2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

989. [bug] Report filename if $INCLUDE fails for file related

errors.  [RT #1736]
This commit is contained in:
Mark Andrews 2001-09-11 04:56:06 +00:00
parent 64a5004a66
commit 1592bf7349
2 changed files with 23 additions and 6 deletions

View File

@ -1,3 +1,5 @@
989. [bug] Report filename if $INCLUDE fails for file related
errors. [RT #1736]
988. [bug] 'additional-from-auth no;' did not work reliably
in the case of queries answered from the cache.

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: master.c,v 1.124 2001/09/05 16:55:05 gson Exp $ */
/* $Id: master.c,v 1.125 2001/09/11 04:56:06 marka Exp $ */
#include <config.h>
@ -242,11 +242,22 @@ loadctx_destroy(dns_loadctx_t *lctx);
#define MANYERRS(lctx, result) \
((result != ISC_R_SUCCESS) && \
((lctx)->options & DNS_MASTER_MANYERRORS) != 0)
#define SETRESULT(lctx, r) \
do { \
if ((lctx)->result == ISC_R_SUCCESS) \
(lctx)->result = r; \
} while (0)
#define LOGITFILE(result, filename) \
if (result == ISC_R_INVALIDFILE || result == ISC_R_FILENOTFOUND || \
result == ISC_R_IOERROR || result == ISC_R_TOOMANYOPENFILES || \
result == ISC_R_NOPERM) \
(*callbacks->error)(callbacks, "%s: %s:%lu: %s: %s", \
"dns_master_load", source, line, \
filename, dns_result_totext(result)); \
else LOGIT(result)
#define LOGIT(result) \
if (result == ISC_R_NOMEMORY) \
(*callbacks->error)(callbacks, "dns_master_load: %s", \
@ -946,10 +957,12 @@ load(dns_loadctx_t *lctx) {
ictx->origin, lctx);
if (MANYERRS(lctx, result)) {
SETRESULT(lctx, result);
LOGIT(result);
LOGITFILE(result, include_file);
continue;
} else if (result != ISC_R_SUCCESS)
goto log_and_cleanup;
} else if (result != ISC_R_SUCCESS) {
LOGITFILE(result, include_file);
goto insist_and_cleanup;
}
ictx = lctx->inc;
line = isc_lex_getsourceline(lctx->lex);
source =
@ -1125,8 +1138,10 @@ load(dns_loadctx_t *lctx) {
SETRESULT(lctx, result);
LOGIT(result);
continue;
} else if (result != ISC_R_SUCCESS)
goto log_and_cleanup;
} else if (result != ISC_R_SUCCESS) {
LOGITFILE(result, include_file);
goto insist_and_cleanup;
}
ictx = lctx->inc;
line = isc_lex_getsourceline(lctx->lex);
source = isc_lex_getsourcename(lctx->lex);