2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 21:17:54 +00:00

2942. [contrib] zone2sqlite failed to setup the entropy sources.

[RT #21610]
This commit is contained in:
Mark Andrews 2010-08-16 05:32:44 +00:00
parent f0b944480e
commit f94ec08c17
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,6 @@
2942. [contrib] zone2sqlite failed to setup the entropy sources.
[RT #21610]
2941. [bug] sdb and sdlz (dlz's zone database) failed to support
DNAME at the zone apex. [RT #21610]

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zone2sqlite.c,v 1.3 2009/09/01 00:22:26 jinmei Exp $ */
/* $Id: zone2sqlite.c,v 1.4 2010/08/16 05:32:44 marka Exp $ */
#include <stdlib.h>
#include <string.h>
@ -27,7 +27,9 @@
#include <dns/db.h>
#include <dns/dbiterator.h>
#include <isc/entropy.h>
#include <dns/fixedname.h>
#include <isc/hash.h>
#include <dns/name.h>
#include <dns/rdata.h>
#include <dns/rdataset.h>
@ -157,6 +159,7 @@ main(int argc, char *argv[])
dns_rdataset_t rdataset;
dns_rdata_t rdata = DNS_RDATA_INIT;
isc_mem_t *mctx = NULL;
isc_entropy_t *ectx = NULL;
isc_buffer_t b;
isc_result_t result;
@ -173,9 +176,12 @@ main(int argc, char *argv[])
dns_result_register();
mctx = NULL;
result = isc_mem_create(0, 0, &mctx);
check_result(result, "isc_mem_create");
result = isc_entropy_create(mctx, &ectx);
check_result(result, "isc_entropy_create");
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
check_result(result, "isc_hash_create");
isc_buffer_init(&b, porigin, strlen(porigin));
isc_buffer_add(&b, strlen(porigin));
@ -293,6 +299,8 @@ main(int argc, char *argv[])
dns_dbiterator_destroy(&dbiter);
dns_db_detach(&db);
isc_hash_destroy();
isc_entropy_detach(&ectx);
isc_mem_destroy(&mctx);
closeandexit(0);