aboutsummaryrefslogtreecommitdiff
path: root/tests/bind.dlz
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-16 19:31:53 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-05-16 19:31:53 +0300
commitc8865a0d524f3d545836bd4581329089a357661e (patch)
tree4fc437a07086c4304e7ec2446be2a504a3dbd507 /tests/bind.dlz
parent50e703a9a92e755f928699b705612cd4153ffb9f (diff)
downloadgrecs-c8865a0d524f3d545836bd4581329089a357661e.tar.gz
grecs-c8865a0d524f3d545836bd4581329089a357661e.tar.bz2
Add bind testsuite.
* README.submodule: Update URL. * src/bind-lex.l (grecs_bind_new_source): Scan include path. * src/grecs.h (grecs_find_include_file): new proto. * src/preproc.c (try_file): Rename to grecs_find_include_file. Change signature and return type. All uses updated. * tests/Makefile.am (EXTRA_DIST): Add new configs. (TESTSUITE_AT): Add parser-bind.at. * tests/gcffmt.c: Add -I (-include) option. * tests/testsuite.at: Include parser-bind.at. * tests/bind.conf: New file. * tests/bind.dlz: New file. * tests/bind.ext.conf: New file. * tests/bind.int.conf: New file. * tests/bind.keys: New file. * tests/parser-bind.at: New file.
Diffstat (limited to 'tests/bind.dlz')
-rw-r--r--tests/bind.dlz33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/bind.dlz b/tests/bind.dlz
new file mode 100644
index 0000000..ffbbfc9
--- /dev/null
+++ b/tests/bind.dlz
@@ -0,0 +1,33 @@
+# Sample Bind configuration include file (3) for Grecs testsuite.
+# This is a typical (?) DLZ configuraton for BIND.
+#
+dlz "DLZ" {
+ database "mysql
+ {host=localhost socket=/var/run/mysql/mysql.sock dbname=Foo user=bind ssl=false}
+ {select r.zone from dns_soa r, dns_acl a where r.zone = '%zone%'
+ and a.network <= inet_aton('%client%') and inet_aton('%client%') <=
+ a.bcast
+ and a.view = r.view }
+ {select r.ttl, r.type, r.mx_priority,
+ case when r.type='TXT' then concat('\"', r.data, '\"') else r.data end
+ from dns_records r, dns_acl a,
+ where r.zone = '%zone%' and r.host = '%record%'
+ and not (r.type = 'SOA' or r.type = 'NS')
+ and a.network <= inet_aton('%client%') and inet_aton('%client%') <=
+ a.bcast
+ and a.view = r.view }
+ {select r.ttl, r.type, r.data, r.resp_person, r.serial,
+ r.refresh, r.retry, r.expire, r.minimum
+ from dns_soa r, dns_acl a where r.zone = '%zone%'
+ and (r.type = 'SOA' or r.type='NS')
+ and a.network <= inet_aton('%client%') and
+ inet_aton('%client%') <= a.bcast
+ and a.view = r.view }
+ {select r.ttl, r.type, r.host, r.mx_priority, case when r.type='TXT' then
+ concat('\"', r.data, '\"') else r.data end
+ from dns_records r, dns_acl a where r.zone = '%zone%'
+ and a.network <= inet_aton('%client%') and
+ inet_aton('%client%') <= a.bcast
+ and a.view = r.view }
+ {select zone from dns_xfr where zone = '%zone%' and client = '%client%'}";
+};

Return to:

Send suggestions and report system problems to the System administrator.