03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * Permission to use, copy, modify, and distribute this software for any
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * purpose with or without fee is hereby granted, provided that the
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * above copyright notice and this permission notice appear in all
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * USE OR PERFORMANCE OF THIS SOFTWARE.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * conceived and contributed by Rob Butler.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * Permission to use, copy, modify, and distribute this software for any
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * purpose with or without fee is hereby granted, provided that the
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * above copyright notice and this permission notice appear in all
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * USE OR PERFORMANCE OF THIS SOFTWARE.
02d54949f0f1db4729e14c3322b207f58d2578a4Mark Andrews * Copyright (C) 1999-2001, 2016 Internet Systems Consortium, Inc. ("ISC")
02d54949f0f1db4729e14c3322b207f58d2578a4Mark Andrews * This Source Code Form is subject to the terms of the Mozilla Public
02d54949f0f1db4729e14c3322b207f58d2578a4Mark Andrews * License, v. 2.0. If a copy of the MPL was not distributed with this
02d54949f0f1db4729e14c3322b207f58d2578a4Mark Andrews * file, You can obtain one at http://mozilla.org/MPL/2.0/.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrewsstatic dns_sdlzimplementation_t *dlz_bdb = NULL;
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews/* should the bdb driver use threads. */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews/* BDB database names */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * This structure contains all the Berkeley DB handles
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * for this instance of the BDB driver.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews/* forward reference */
abff0f462a758383d012887d3a97da4dac0c5a94Evan Huntbdb_findzone(void *driverarg, void *dbdata, const char *name,
abff0f462a758383d012887d3a97da4dac0c5a94Evan Hunt dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo);
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * Parses the DBT from the Berkeley DB into a parsed_data record
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * The parsed_data record should be allocated before and passed into the
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * bdb_parse_data function. The char (type & data) fields should not
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * be "free"d as that memory is part of the DBT data field. It will be
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * "free"d when the DBT is freed.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews char *lastchar = (char *) &tmp[strlen(tmp) + 1];
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * String should be formated as:
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * zone(a space)host(a space)ttl(a space)type(a space)remaining data
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * example.com www 10 A 127.0.0.1
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * example.com mail 10 A 127.0.0.2
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * example.com @ 10 MX 20 mail.example.com
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* save pointer to zone */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* find space after zone and change it to a '\0' */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* verify we found a space */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* change the space to a null (string terminator) */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* make sure it is safe to increment pointer */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* save pointer to host */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* find space after type and change it to a '\0' */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* verify we found a space */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* change the space to a null (string terminator) */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* make sure it is safe to increment pointer */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* save pointer to dns type */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* find space after type and change it to a '\0' */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* verify we found a space */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* change the space to a null (string terminator) */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* make sure it is safe to increment pointer */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* save pointer to dns ttl */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* find space after ttl and change it to a '\0' */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* verify we found a space */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* change the space to a null (string terminator) */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* make sure it is safe to increment pointer */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* save pointer to remainder of DNS data */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* convert ttl string to integer */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "BDB driver ttl must be a postive number");
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* if we get this far everything should have worked. */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * DLZ methods
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrewsbdb_allowzonexfr(void *driverarg, void *dbdata, const char *name,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews bdb_instance_t *db = (bdb_instance_t *) dbdata;
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* check to see if we are authoritative for the zone first. */
abff0f462a758383d012887d3a97da4dac0c5a94Evan Hunt result = bdb_findzone(driverarg, dbdata, name, NULL, NULL);
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* get a cursor to loop through zone data */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews if (db->client->cursor(db->client, NULL, &client_cursor, 0) != 0) {
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews switch(client_cursor->c_get(client_cursor, &key, &data, DB_GET_BOTH)) {
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* free any memory duplicate string in the key field */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* free any memory allocated to the data field. */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* get rid of zone_cursor */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrewsbdb_allnodes(const char *zone, void *driverarg, void *dbdata,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews bdb_instance_t *db = (bdb_instance_t *) dbdata;
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* get a cursor to loop through zone data */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews if (db->zone->cursor(db->zone, NULL, &zone_cursor, 0) != 0) {
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews while ((bdbres = zone_cursor->c_get(zone_cursor, &key, &data,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews result = dns_sdlz_putnamedrr(allnodes, pd.host, pd.type,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews } /* end while loop */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* free any memory duplicate string in the key field */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* get rid of zone_cursor */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * Performs BDB cleanup.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * Used by bdb_create if there is an error starting up.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * Used by bdb_destroy when the driver is shutting down.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* close databases */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* close environment */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* cleanup memory */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* save mctx for later */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* return, and detach the memory */
abff0f462a758383d012887d3a97da4dac0c5a94Evan Huntbdb_findzone(void *driverarg, void *dbdata, const char *name,
abff0f462a758383d012887d3a97da4dac0c5a94Evan Hunt dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo)
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews bdb_instance_t *db = (bdb_instance_t *) dbdata;
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* get a cursor to loop through zone data */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews if (db->zone->cursor(db->zone, NULL, &zone_cursor, 0) != 0) {
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews switch(zone_cursor->c_get(zone_cursor, &key, &data, DB_SET)) {
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* free any memory duplicate string in the key field */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* free any memory allocated to the data field. */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* get rid of zone_cursor */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrewsbdb_lookup(const char *zone, const char *name, void *driverarg,
793814f80703afdd69b59ade91e63efa81ae4178Evan Hunt dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo)
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews bdb_instance_t *db = (bdb_instance_t *) dbdata;
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* set zone key */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* get a cursor to loop through zone data */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews if (db->zone->cursor(db->zone, NULL, &zone_cursor, 0) != 0) {
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* initialize zone_cursor with zone_key */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews if (zone_cursor->c_get(zone_cursor, &key, &data, DB_SET) != 0) {
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* set host key */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* get a cursor to loop through host data */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews if (db->host->cursor(db->host, NULL, &host_cursor, 0) != 0) {
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* initialize host_cursor with host_key */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews if (host_cursor->c_get(host_cursor, &key, &data, DB_SET) != 0) {
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews db->data->join(db->data, cur_arr, &join_cursor, 0);
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews while ((bdbres = join_cursor->c_get(join_cursor, &key,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews &data, 0)) == 0) {
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews result = dns_sdlz_putrr(lookup, pd.type, pd.ttl, pd.data);
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews } /* end while loop */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* get rid of the joined cusor */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* get rid of zone_cursor */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* get rid of host_cursor */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews/*% Initializes, sets flags and then opens Berkeley databases. */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrewsbdb_opendb(DB_ENV *db_env, DBTYPE db_type, DB **db, const char *db_name,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* Initialize the database. */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews if ((result = db_create(db, db_env, 0)) != 0) {
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "BDB could not initialize %s database. "
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "BDB error: %s",
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* set database flags. */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews if ((result = (*db)->set_flags(*db, flags)) != 0) {
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "BDB could not set flags for %s database. "
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "BDB error: %s",
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* open the database. */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews if ((result = (*db)->open(*db, NULL, db_file, db_name, db_type,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "BDB could not open %s database in %s. "
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "BDB error: %s",
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrewsbdb_create(const char *dlzname, unsigned int argc, char *argv[],
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* verify we have 3 arg's passed to the driver */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "Berkeley DB driver requires at least "
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "2 command line args.");
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* allocate and zero memory for driver structure */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews db = isc_mem_get(ns_g_mctx, sizeof(bdb_instance_t));
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "Could not allocate memory for "
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "database instance object.");
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* attach to the memory context */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* create BDB environment
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * Basically BDB allocates and assigns memory to db->dbenv
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "BDB environment could not be created. "
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "BDB error: %s",
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* open BDB environment */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "BDB environment at '%s' could not be opened. "
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "BDB error: %s",
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* open dlz_data database. */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews result = bdb_opendb(db->dbenv, DB_UNKNOWN, &db->data,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* open dlz_host database. */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews result = bdb_opendb(db->dbenv, DB_UNKNOWN, &db->host,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* open dlz_zone database. */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews result = bdb_opendb(db->dbenv, DB_UNKNOWN, &db->zone,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* open dlz_client database. */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews result = bdb_opendb(db->dbenv, DB_UNKNOWN, &db->client,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* associate the host secondary database with the primary database */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews bdbres = db->data->associate(db->data, NULL, db->host, NULL, 0);
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "BDB could not associate %s database with %s. "
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "BDB error: %s",
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews /* associate the zone secondary database with the primary database */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews bdbres = db->data->associate(db->data, NULL, db->zone, NULL, 0);
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "BDB could not associate %s database with %s. "
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "BDB error: %s",
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews/* bdb_authority not needed as authority data is returned by lookup */
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * Wrapper around dns_sdlzregister().
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * Write debugging message to log
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "Registering DLZ bdb driver.");
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews result = dns_sdlzregister("bdb", &dlz_bdb_methods, NULL,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "dns_sdlzregister() failed: %s",
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * Wrapper around dns_sdlzunregister().
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews * Write debugging message to log
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews "Unregistering DLZ bdb driver.");