我从源代码编译绑定9(见下文),并建立与MySQL DLZ的Bind9。 当我试图从服务器获取关于缓冲区溢出的任何信息时,我总是收到错误。我GOOGLE了很多次,但找不到任何关于如何解决这个错误。Bind9和MySQL的DLZ缓冲区错误
配置选项:
[email protected]:/opt/bind9/bind-9.9.1-P3# named -V BIND 9.9.1-P3 built with '--prefix=/opt/bind9' '--mandir=/opt/bind9/man' '--infodir=/opt/bind9/info' '--sysconfdir=/opt/bind9/config' '--localstatedir=/opt/bind9/var' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-dlz-postgres=no' '--with-dlz-mysql=yes' '--with-dlz-bdb=no' '--with-dlz-filesystem=yes' '--with-dlz-stub=yes' '--with-dlz-ldap=yes' '--enable-ipv6' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions' 'CPPFLAGS=' using OpenSSL version: OpenSSL 1.0.1 14 Mar 2012 using libxml2 version: 2.7.8
这是我收到的时候我dig example.com
(含调试)错误:
Query String: select ttl, type, mx_priority, case when lower(type)='txt' then concat('"', data, '"') else data end from dns_records where zone = 'example.com' and host = '@'
17-Sep-2012 01:09:33.610 dns_rdata_fromtext: buffer-0x7f5bfca73360:1: unexpected end of input 17-Sep-2012 01:09:33.610 dns_sdlz_putrr returned error. Error code was: unexpected end of input 17-Sep-2012 01:09:33.610 Query String: select ttl, type, mx_priority, case when lower(type)='txt' then concat('"', data, '"') else data end from dns_records where zone = 'example.com' and host = '*'
17-Sep-2012 01:09:33.610 query.c:2579: fatal error: 17-Sep-2012 01:09:33.610 RUNTIME_CHECK(result == 0) failed 17-Sep-2012 01:09:33.610 exiting (due to fatal error in library)
的named.conf
options {
directory "/opt/bind9/";
allow-query-cache { none; };
allow-query { any; };
recursion no;
};
dlz "Mysql zone" {
database "mysql
{host=localhost dbname=system ssl=false user=root pass=*password*}
{select zone from dns_records where zone = '$zone$'}
{select ttl, type, mx_priority, case when lower(type)='txt' then concat('\"', data, '\"')
else data end from dns_records where zone = '$zone$' and host = '$record$'}
{}
{}
{}
{}";
};