]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_9] fixed testing problems with bdbhtp DLZ module
authorEvan Hunt <each@isc.org>
Thu, 12 Feb 2015 18:25:23 +0000 (10:25 -0800)
committerEvan Hunt <each@isc.org>
Thu, 12 Feb 2015 18:25:23 +0000 (10:25 -0800)
contrib/dlz/modules/bdbhpt/README.md
contrib/dlz/modules/bdbhpt/testing/README [new file with mode: 0644]
contrib/dlz/modules/bdbhpt/testing/dns-data.txt
contrib/dlz/modules/bdbhpt/testing/named.conf [new file with mode: 0644]

index 10dd81e24bfd23efe26d00fc60d8a646a9237b01..10f10a9bd27eb72ead85d29957d70392cd2454c2 100644 (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
diff --git a/contrib/dlz/modules/bdbhpt/testing/README b/contrib/dlz/modules/bdbhpt/testing/README
new file mode 100644 (file)
index 0000000..aec0935
--- /dev/null
@@ -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
index 7ad5be90c10abbacec0c00833bdaaaa2a3851f15..242cd3d126a71a98c3b78f539d64eb2a67e5d3e7 100644 (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%.
diff --git a/contrib/dlz/modules/bdbhpt/testing/named.conf b/contrib/dlz/modules/bdbhpt/testing/named.conf
new file mode 100644 (file)
index 0000000..584a1cf
--- /dev/null
@@ -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";
+};