+ 521. [bug] Detect master files which contain $INCLUDE and always
+ reload. [RT #196]
+
520. [bug] Upgraded libtool to 1.3.5, which allows shared
library builds to work on AIX (and possibly others).
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dnssec-signkey.c,v 1.37 2000/09/26 22:11:22 bwelling Exp $ */
+/* $Id: dnssec-signkey.c,v 1.38 2000/10/17 07:22:21 marka Exp $ */
#include <config.h>
check_result(result, "dns_db_create()");
result = dns_db_load(db, argv[0]);
- if (result != ISC_R_SUCCESS)
+ if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
fatal("failed to load database from '%s': %s", argv[0],
isc_result_totext(result));
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dnssec-signzone.c,v 1.100 2000/09/26 22:11:23 bwelling Exp $ */
+/* $Id: dnssec-signzone.c,v 1.101 2000/10/17 07:22:22 marka Exp $ */
#include <config.h>
check_result(result, "dns_db_create()");
result = dns_db_load(*db, filename);
- if (result != ISC_R_SUCCESS)
+ if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
dns_db_detach(db);
}
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: server.c,v 1.229 2000/10/13 22:35:45 bwelling Exp $ */
+/* $Id: server.c,v 1.230 2000/10/17 07:22:23 marka Exp $ */
#include <config.h>
NS_LOGMODULE_SERVER,
ISC_LOG_DEBUG(1), "loading cache '%s'",
ns_g_cachefile);
+ /* DNS_R_SEENINCLUDE should be impossible here. */
CHECK(dns_db_load(view->cachedb, ns_g_cachefile));
}
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zoneconf.c,v 1.62 2000/10/13 23:21:16 bwelling Exp $ */
+/* $Id: zoneconf.c,v 1.63 2000/10/17 07:22:35 marka Exp $ */
#include <config.h>
dns_zone_setqueryacl,
dns_zone_clearqueryacl));
- result = dns_c_zone_getdialup(czone, &boolean);
- if (result != ISC_R_SUCCESS)
- result = dns_c_ctx_getdialup(cctx, &boolean);
- if (result != ISC_R_SUCCESS)
- boolean = ISC_FALSE;
- dns_zone_setoption(zone, DNS_ZONEOPT_DIALUP, boolean);
+ if (czone->ztype != dns_c_zone_hint) {
+ result = dns_c_zone_getdialup(czone, &boolean);
+ if (result != ISC_R_SUCCESS)
+ result = dns_c_ctx_getdialup(cctx, &boolean);
+ if (result != ISC_R_SUCCESS)
+ boolean = ISC_FALSE;
+ dns_zone_setoption(zone, DNS_ZONEOPT_DIALUP, boolean);
+ }
#ifndef NOMINUM_PUBLIC
if (czone->ztype != dns_c_zone_stub) {
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: db_test.c,v 1.53 2000/08/01 01:12:40 tale Exp $ */
+/* $Id: db_test.c,v 1.54 2000/10/17 07:22:25 marka Exp $ */
/*
* Principal Author: Bob Halley
printf("loading %s (%s)\n", filename, origintext);
result = dns_db_load(dbi->db, filename);
- if (result != ISC_R_SUCCESS) {
+ if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE) {
dns_db_detach(&dbi->db);
isc_mem_put(mctx, dbi, sizeof *dbi);
return (result);
# class is the zone's class
# expected_result is a text representation of a dns_result_t
#
-master8.data test in ISC_R_SUCCESS
+master8.data test in DNS_R_SEENINCLUDE
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nxtify.c,v 1.16 2000/09/15 21:40:39 bwelling Exp $ */
+/* $Id: nxtify.c,v 1.17 2000/10/17 07:22:26 marka Exp $ */
#include <config.h>
dns_rdataclass_in, 0, NULL, &db);
check_result(result, "dns_db_create()");
result = dns_db_load(db, filename);
+ if (result == DNS_R_SEENINCLUDE)
+ result = ISC_R_SUCCCESS;
check_result(result, "dns_db_load()");
wversion = NULL;
result = dns_db_newversion(db, &wversion);
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: db.c,v 1.56 2000/09/26 22:45:52 bwelling Exp $ */
+/* $Id: db.c,v 1.57 2000/10/17 07:22:29 marka Exp $ */
/***
*** Imports
#include <dns/master.h>
#include <dns/rdata.h>
#include <dns/rdataset.h>
+#include <dns/result.h>
/***
*** Private Types
* result if dns_master_loadfile() succeeded. If dns_master_loadfile()
* failed, we want to return the result code it gave us.
*/
- if (result == ISC_R_SUCCESS)
+ if (result == ISC_R_SUCCESS || result == DNS_R_SEENINCLUDE)
result = eresult;
return (result);
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: master.h,v 1.24 2000/09/05 03:35:22 marka Exp $ */
+/* $Id: master.h,v 1.25 2000/10/17 07:22:36 marka Exp $ */
#ifndef DNS_MASTER_H
#define DNS_MASTER_H 1
*
* Returns:
* ISC_R_SUCCESS upon successfully loading the master file.
+ * ISC_R_SEENINCLUDE upon successfully loading the master file with
+ * a $INCLUDE statement.
* ISC_R_NOMEMORY out of memory.
* ISC_R_UNEXPECTEDEND expected to be able to read a input token and
* there was not one.
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: result.h,v 1.68 2000/10/16 04:08:13 marka Exp $ */
+/* $Id: result.h,v 1.69 2000/10/17 07:22:38 marka Exp $ */
#ifndef DNS_RESULT_H
#define DNS_RESULT_H 1
#define DNS_R_RECOVERABLE (ISC_RESULTCLASS_DNS + 63)
#define DNS_R_UNKNOWNOPT (ISC_RESULTCLASS_DNS + 64)
#define DNS_R_UNEXPECTEDID (ISC_RESULTCLASS_DNS + 65)
+#define DNS_R_SEENINCLUDE (ISC_RESULTCLASS_DNS + 66)
-#define DNS_R_NRESULTS 66 /* Number of results */
+#define DNS_R_NRESULTS 67 /* Number of results */
/*
* DNS wire format rcodes.
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: master.c,v 1.72 2000/09/23 01:05:35 bwelling Exp $ */
+/* $Id: master.c,v 1.73 2000/10/17 07:22:30 marka Exp $ */
#include <config.h>
isc_boolean_t default_ttl_known;
isc_boolean_t warn_1035;
isc_boolean_t age_ttl;
+ isc_boolean_t seen_include;
isc_uint32_t ttl;
isc_uint32_t default_ttl;
dns_rdataclass_t zclass;
ctx->default_ttl = 0;
ctx->warn_1035 = ISC_TRUE; /* XXX Argument? */
ctx->age_ttl = age_ttl;
+ ctx->seen_include = ISC_FALSE;
ctx->zclass = zclass;
dns_fixedname_init(&ctx->fixed_top);
CTX_COPYVAR(ctx, *ctxp, ttl);
CTX_COPYVAR(ctx, *ctxp, default_ttl);
CTX_COPYVAR(ctx, *ctxp, warn_1035);
+ CTX_COPYVAR(ctx, *ctxp, seen_include);
dns_loadctx_detach(&ctx);
ctx = *ctxp;
continue;
if (!done) {
INSIST(ctx->done != NULL && ctx->task != NULL);
result = DNS_R_CONTINUE;
- }
+ } else if (result == ISC_R_SUCCESS && ctx->seen_include)
+ result = DNS_R_SEENINCLUDE;
goto cleanup;
log_and_cleanup:
ctx = *ctxp;
REQUIRE(DNS_LCTX_VALID(ctx));
+ ctx->seen_include = ISC_TRUE;
+
result = loadctx_create(ctx->mctx, ctx->age_ttl, ctx->top,
ctx->zclass, origin, ctx->callbacks,
ctx->task, ctx->done, ctx->done_arg,
CTX_COPYVAR(ctx, new, ttl);
CTX_COPYVAR(ctx, new, default_ttl);
CTX_COPYVAR(ctx, new, warn_1035);
+ CTX_COPYVAR(ctx, new, seen_include);
result = isc_lex_openfile(new->lex, master_file);
if (result != ISC_R_SUCCESS)
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: result.c,v 1.74 2000/10/16 04:08:11 marka Exp $ */
+/* $Id: result.c,v 1.75 2000/10/17 07:22:31 marka Exp $ */
#include <config.h>
"recoverable error occurred", /* 63 DNS_R_RECOVERABLE */
"unknown opt attribute record", /* 64 DNS_R_UNKNOWNOPT */
- "unexpected message id" /* 65 DNS_R_UNEXPECTEDID */
+ "unexpected message id", /* 65 DNS_R_UNEXPECTEDID */
+ "seen include file" /* 66 DNS_R_SEENINCLUDE */
};
static const char *rcode_text[DNS_R_NRCODERESULTS] = {
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rootns.c,v 1.15 2000/08/01 01:22:53 tale Exp $ */
+/* $Id: rootns.c,v 1.16 2000/10/17 07:22:32 marka Exp $ */
#include <config.h>
#include <dns/callbacks.h>
#include <dns/db.h>
#include <dns/master.h>
+#include <dns/result.h>
#include <dns/rootns.h>
static char root_ns[] =
} else
result = ISC_R_NOTFOUND;
eresult = dns_db_endload(db, &callbacks.add_private);
- if (result == ISC_R_SUCCESS)
+ if (result == ISC_R_SUCCESS || result == DNS_R_SEENINCLUDE)
result = eresult;
- if (result != ISC_R_SUCCESS)
+ if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
goto db_detach;
*target = db;
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.c,v 1.235 2000/10/16 22:26:25 mws Exp $ */
+/* $Id: zone.c,v 1.236 2000/10/17 07:22:34 marka Exp $ */
#include <config.h>
#define DNS_ZONEFLG_NEEDDUMP 0x00000002U /* zone need consolidation */
#define DNS_ZONEFLG_USEVC 0x00000004U /* use tcp for refresh query */
#define DNS_ZONEFLG_DUMPING 0x00000008U /* a dump is in progress */
-/* #define DNS_ZONEFLG_UNUSED 0x00000010U */ /* unused */
+#define DNS_ZONEFLG_HASINCLUDE 0x00000010U /* $INCLUDE in zone file */
#define DNS_ZONEFLG_LOADED 0x00000020U /* database has loaded */
#define DNS_ZONEFLG_EXITING 0x00000040U /* zone is being destroyed */
#define DNS_ZONEFLG_EXPIRED 0x00000080U /* zone has expired */
* than the last time the zone was loaded. If the zone has not
* been loaded yet, zone->loadtime will be the epoch.
*/
- result = isc_file_getmodtime(zone->dbname, &filetime);
- if (result == ISC_R_SUCCESS && ! isc_time_isepoch(&zone->loadtime) &&
- isc_time_compare(&filetime, &zone->loadtime) < 0) {
- zone_log(zone, me, ISC_LOG_DEBUG(1),
- "skipping: database file older than last load");
- result = ISC_R_SUCCESS;
- goto cleanup;
+ if (!DNS_ZONEFLG_HASINCLUDE) {
+ result = isc_file_getmodtime(zone->dbname, &filetime);
+ if (result == ISC_R_SUCCESS &&
+ !isc_time_isepoch(&zone->loadtime) &&
+ isc_time_compare(&filetime, &zone->loadtime) < 0) {
+ zone_log(zone, me, ISC_LOG_DEBUG(1),
+ "skipping: database file older"
+ " than last load");
+ result = ISC_R_SUCCESS;
+ goto cleanup;
+ }
}
/*
load->zone->rdclass, ISC_FALSE,
&load->callbacks, task,
zone_loaddone, load, load->zone->mctx);
- if (result != ISC_R_SUCCESS && result != DNS_R_CONTINUE)
+ if (result != ISC_R_SUCCESS && result != DNS_R_CONTINUE &&
+ result != DNS_R_SEENINCLUDE)
goto fail;
return;
* indicates that the "permanent" form does not exist.
* XXX better error feedback to log.
*/
- if (result != ISC_R_SUCCESS) {
+ if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE) {
if (zone->type == dns_zone_slave ||
zone->type == dns_zone_stub) {
if (result == ISC_R_FILENOTFOUND)
zone_log(zone, me, ISC_LOG_INFO, "loaded");
+ if (result == DNS_R_SEENINCLUDE)
+ zone->flags |= DNS_ZONEFLG_HASINCLUDE;
+ else
+ zone->flags &= ~DNS_ZONEFLG_HASINCLUDE;
/*
* Apply update log, if any.
*/
DNS_ENTER;
tresult = dns_db_endload(load->db, &load->callbacks.add_private);
- if (result == ISC_R_SUCCESS)
+ if (result == ISC_R_SUCCESS || result == DNS_R_SEENINCLUDE)
result = tresult;
LOCK(&load->zone->lock);
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zoneconf.c,v 1.62 2000/10/13 23:21:16 bwelling Exp $ */
+/* $Id: zoneconf.c,v 1.63 2000/10/17 07:22:35 marka Exp $ */
#include <config.h>
dns_zone_setqueryacl,
dns_zone_clearqueryacl));
- result = dns_c_zone_getdialup(czone, &boolean);
- if (result != ISC_R_SUCCESS)
- result = dns_c_ctx_getdialup(cctx, &boolean);
- if (result != ISC_R_SUCCESS)
- boolean = ISC_FALSE;
- dns_zone_setoption(zone, DNS_ZONEOPT_DIALUP, boolean);
+ if (czone->ztype != dns_c_zone_hint) {
+ result = dns_c_zone_getdialup(czone, &boolean);
+ if (result != ISC_R_SUCCESS)
+ result = dns_c_ctx_getdialup(cctx, &boolean);
+ if (result != ISC_R_SUCCESS)
+ boolean = ISC_FALSE;
+ dns_zone_setoption(zone, DNS_ZONEOPT_DIALUP, boolean);
+ }
#ifndef NOMINUM_PUBLIC
if (czone->ztype != dns_c_zone_stub) {
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: t_api.c,v 1.42 2000/08/01 01:33:14 tale Exp $ */
+/* $Id: t_api.c,v 1.43 2000/10/17 07:22:39 marka Exp $ */
#include <config.h>
{ DNS_R_BADDB, "DNS_R_BADDB" },
{ DNS_R_ZONECUT, "DNS_R_ZONECUT" },
{ DNS_R_NOTZONETOP, "DNS_R_NOTZONETOP" },
+ { DNS_R_SEENINCLUDE, "DNS_R_SEENINCLUDE" },
{ (isc_result_t)0, NULL }
};