Help with sdb/pgsql zonetodb

Jason Vas Dias jvdias at redhat.com
Thu Aug 11 16:56:58 UTC 2005


On Thu, 2005-08-11 at 11:17, Enrico Pelletta wrote:
> Hi!
> 
> I'm trying to making working Bind 9.3.1 with sdb/pgsql on Debian 3.1
> running postgresql 7.4.7.
> 
> I built and installed bind with sdb/pgsql. Now, I would like to use
> zonetodb to add into my DB a test zone. The tool successfully compiled
> but when I run:
> 
> ./zonetodb mydom.net myzonefile zonesDB t_zone
> 
> I always get the error message:
> 
> hash.c:383: INSIST(hash != ((void *)0) && ((((hash)) != ((void *)0)) &&
> (((const isc__magic_t *)((hash)))->magic == ((('H') << 24 | ('a') << 16
> | ('s') << 8 | ('h')))))) failed.
> Aborted
> 
> It seems zonetodb fails when running the following main function line:.
> 
> result = dns_db_create(mctx, "rbt", origin,
> dns_dbtype_zone,dns_rdataclass_in, 0, NULL, &db);
> 
> I have token a look around without founding any kind of tips. I'm new to
> bind/sdb and any help will be really welcome!
> Thank!
> 
>     Enrico.
> 
> 
You need to apply something like this patch, which I applied in 
Red Hat bind-9.3.1's contrib/sdb/ldap/zone2ldap.c, @ line 200, in the 
main() function initialization code before any dns_*name or 
dns_db_create functions are called:

+
+  /* It is required to initialize the hash before dns_db_create in BIND 9 */
+  result = isc_hash_create(isc_ctx, NULL, DNS_NAME_MAXWIRE);
+  isc_result_check (result, "isc_hash_create");
+

I'll patch Red Hat's zonetodb.c today in bind-9.3.1-10 and you can pick it up
from there.






More information about the bind-users mailing list