2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

[master] fixed testing problems with bdbhtp DLZ module

This commit is contained in:
Evan Hunt
2015-02-12 10:20:36 -08:00
parent ffc393dd18
commit ff7cc592b7
5 changed files with 62 additions and 16 deletions

View File

@@ -34,14 +34,11 @@ With the above requirements satisfied perform the following steps:
2. Run: make
3. Run: sudo make install # this will install dlz_bdbhpt_dynamic.so
into /usr/lib/bind9/
4. Add a DLZ statement similar to the example shown in
example/dlz.conf into your Bind configuration
4. Add a DLZ statement similar to the example below into your
Bind configuration
5. Ensure your BerkeleyDB home-directory exists and can be written to
by the bind user
6. If you're running an AppArmor enabled Bind, consider adding content
included within example/apparmor.d-local-usr.sbin.named within
/etc/apparmor.d/local/usr.sbin.named
7. Use the included testing/bdbhpt-populate.pl script to provide some
6. Use the included testing/bdbhpt-populate.pl script to provide some
data for initial testing
Usage

View File

@@ -49,8 +49,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id$ */
/*
* This is simply a merge of Andrew Tridgell's dlz_example.c and the
* original bdb_bdbhpt_driver.c
@@ -735,7 +733,7 @@ dlz_create(const char *dlzname, unsigned int argc, char *argv[],
if (bdbhptres != 0) {
db->log(ISC_LOG_ERROR,
"bdbhpt_dynamic: db environment could not be created. "
"BerkeleyDB error: %s",jdb_strerror(bdbhptres));
"BerkeleyDB error: %s", db_strerror(bdbhptres));
result = ISC_R_FAILURE;
goto init_cleanup;
}

View File

@@ -0,0 +1,11 @@
These files were used for testing on Ubuntu Linux using BDB 5.1 and
BerkeleyDB 0.54 for perl.
- Populate the database from dns-data.txt for zone example.com:
perl bdbhpt-populate.pl \
--bdb=test.db --input=dns-data.txt --zones=example.com
- Run "named -g -c named.conf"
BDB server is now loaded with example.com data from the file test.db

View File

@@ -1,8 +1,8 @@
# Name TTL Type Data
@ 3600 SOA ns1.%zone%. root.%zone%. 2012071700 604800 86400 2419200 10800
@ 3600 NS ns1.%zone%
@ 3600 MX 5 mx1.%zone%
@ 3600 MX 10 mx2.%zone%
@ 3600 NS ns1.%zone%.
@ 3600 MX 5 mx1.%zone%.
@ 3600 MX 10 mx2.%zone%.
@ 3600 TXT This zone brought to you by %driver%!
jabber 3600 A 127.0.0.1
mx1 3600 A 127.0.0.2
@@ -13,7 +13,7 @@ ns1 3600 AAAA ::1
voip 3600 A 127.0.0.6
www 3600 CNAME www1.%zone%
www1 3600 A 127.0.0.7
_sip._udp 3600 SRV 5 0 5060 voip.%zone%
_jabber._tcp 3600 SRV 5 0 5269 jabber.%zone%
_xmpp-client._tcp 3600 SRV 5 0 5222 jabber.%zone%
_xmpp-server._tcp 3600 SRV 5 0 5269 jabber.%zone%
_sip._udp 3600 SRV 5 0 5060 voip.%zone%.
_jabber._tcp 3600 SRV 5 0 5269 jabber.%zone%.
_xmpp-client._tcp 3600 SRV 5 0 5222 jabber.%zone%.
_xmpp-server._tcp 3600 SRV 5 0 5269 jabber.%zone%.

View File

@@ -0,0 +1,40 @@
/*
* Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
controls { };
options {
directory ".";
port 5300;
pid-file "named.pid";
session-keyfile "session.key";
listen-on { any; };
listen-on-v6 { none; };
recursion no;
};
key rndc_key {
secret "1234abcd8765";
algorithm hmac-md5;
};
controls {
inet 127.0.0.1 port 9953 allow { any; } keys { rndc_key; };
};
dlz "bdbhpt_dynamic" {
database "dlopen ../dlz_bdbhpt_dynamic.so T . test.db";
};