diff options
author | Internet Software Consortium, Inc <@isc.org> | 2007-09-07 14:09:08 -0600 |
---|---|---|
committer | LaMont Jones <lamont@debian.org> | 2007-09-07 14:09:08 -0600 |
commit | 3a0c832e19a6753d0411a24a5f72dd427fbec1a5 (patch) | |
tree | 4f28c1af56709d5ce1dcf3f2d7cb99f84c480f28 /bin/dnssec | |
parent | 141f224ab33e06237b5cfa0e6a7e0f4b3847e13b (diff) | |
download | bind9-3a0c832e19a6753d0411a24a5f72dd427fbec1a5.tar.gz |
9.1.3rc2
Diffstat (limited to 'bin/dnssec')
-rw-r--r-- | bin/dnssec/dnssectool.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/bin/dnssec/dnssectool.c b/bin/dnssec/dnssectool.c index 87c08235..f4669fb7 100644 --- a/bin/dnssec/dnssectool.c +++ b/bin/dnssec/dnssectool.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssectool.c,v 1.26.2.1 2001/01/09 22:31:35 bwelling Exp $ */ +/* $Id: dnssectool.c,v 1.26.2.2 2001/06/08 23:27:29 bwelling Exp $ */ #include <config.h> @@ -267,23 +267,26 @@ setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx) { result = isc_entropy_create(mctx, ectx); if (result != ISC_R_SUCCESS) fatal("could not create entropy object"); - if (randomfile != NULL && strcasecmp(randomfile, "keyboard") != 0) { + +#ifdef PATH_RANDOMDEV + if (randomfile == NULL) { + result = isc_entropy_createfilesource(*ectx, PATH_RANDOMDEV); + if (result == ISC_R_SUCCESS) + return; + } +#endif + + if (randomfile != NULL && strcasecmp(randomfile, "keyboard") == 0) { + wantkeyboard = ISC_TRUE; + randomfile = NULL; + } + + if (randomfile != NULL) { result = isc_entropy_createfilesource(*ectx, randomfile); if (result != ISC_R_SUCCESS) fatal("could not open randomdev %s: %s", randomfile, isc_result_totext(result)); - } - else { -#ifdef PATH_RANDOMDEV - if (randomfile == NULL) { - result = isc_entropy_createfilesource(*ectx, - PATH_RANDOMDEV); - if (result == ISC_R_SUCCESS) - return; - } - else -#endif - wantkeyboard = ISC_TRUE; + } else { result = isc_entropy_createcallbacksource(*ectx, kbdstart, kbdget, kbdstop, &kbd, &source); |