mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
989. [bug] Report filename if $INCLUDE fails for file related
errors. [RT #1736]
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -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
|
988. [bug] 'additional-from-auth no;' did not work reliably
|
||||||
in the case of queries answered from the cache.
|
in the case of queries answered from the cache.
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* 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>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -242,11 +242,22 @@ loadctx_destroy(dns_loadctx_t *lctx);
|
|||||||
#define MANYERRS(lctx, result) \
|
#define MANYERRS(lctx, result) \
|
||||||
((result != ISC_R_SUCCESS) && \
|
((result != ISC_R_SUCCESS) && \
|
||||||
((lctx)->options & DNS_MASTER_MANYERRORS) != 0)
|
((lctx)->options & DNS_MASTER_MANYERRORS) != 0)
|
||||||
|
|
||||||
#define SETRESULT(lctx, r) \
|
#define SETRESULT(lctx, r) \
|
||||||
do { \
|
do { \
|
||||||
if ((lctx)->result == ISC_R_SUCCESS) \
|
if ((lctx)->result == ISC_R_SUCCESS) \
|
||||||
(lctx)->result = r; \
|
(lctx)->result = r; \
|
||||||
} while (0)
|
} 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) \
|
#define LOGIT(result) \
|
||||||
if (result == ISC_R_NOMEMORY) \
|
if (result == ISC_R_NOMEMORY) \
|
||||||
(*callbacks->error)(callbacks, "dns_master_load: %s", \
|
(*callbacks->error)(callbacks, "dns_master_load: %s", \
|
||||||
@@ -946,10 +957,12 @@ load(dns_loadctx_t *lctx) {
|
|||||||
ictx->origin, lctx);
|
ictx->origin, lctx);
|
||||||
if (MANYERRS(lctx, result)) {
|
if (MANYERRS(lctx, result)) {
|
||||||
SETRESULT(lctx, result);
|
SETRESULT(lctx, result);
|
||||||
LOGIT(result);
|
LOGITFILE(result, include_file);
|
||||||
continue;
|
continue;
|
||||||
} else if (result != ISC_R_SUCCESS)
|
} else if (result != ISC_R_SUCCESS) {
|
||||||
goto log_and_cleanup;
|
LOGITFILE(result, include_file);
|
||||||
|
goto insist_and_cleanup;
|
||||||
|
}
|
||||||
ictx = lctx->inc;
|
ictx = lctx->inc;
|
||||||
line = isc_lex_getsourceline(lctx->lex);
|
line = isc_lex_getsourceline(lctx->lex);
|
||||||
source =
|
source =
|
||||||
@@ -1125,8 +1138,10 @@ load(dns_loadctx_t *lctx) {
|
|||||||
SETRESULT(lctx, result);
|
SETRESULT(lctx, result);
|
||||||
LOGIT(result);
|
LOGIT(result);
|
||||||
continue;
|
continue;
|
||||||
} else if (result != ISC_R_SUCCESS)
|
} else if (result != ISC_R_SUCCESS) {
|
||||||
goto log_and_cleanup;
|
LOGITFILE(result, include_file);
|
||||||
|
goto insist_and_cleanup;
|
||||||
|
}
|
||||||
ictx = lctx->inc;
|
ictx = lctx->inc;
|
||||||
line = isc_lex_getsourceline(lctx->lex);
|
line = isc_lex_getsourceline(lctx->lex);
|
||||||
source = isc_lex_getsourcename(lctx->lex);
|
source = isc_lex_getsourcename(lctx->lex);
|
||||||
|
Reference in New Issue
Block a user