我從源代碼編譯綁定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$'}
{}
{}
{}
{}";
};