]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorBrian Wellington <source@isc.org>
Fri, 8 Jun 2001 23:27:29 +0000 (23:27 +0000)
committerBrian Wellington <source@isc.org>
Fri, 8 Jun 2001 23:27:29 +0000 (23:27 +0000)
 894.   [bug]           When using the DNSSEC tools, a message intended to warn
when the keyboard was being used because of the lack
of a suitable random device was not being printed.

CHANGES
bin/dnssec/dnssectool.c

diff --git a/CHANGES b/CHANGES
index 12ecfd942fa28c72fd042fb8f92eb81f866bc28f..943aed02b87da5ae609475264d7c861f931934a2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+ 894.  [bug]           When using the DNSSEC tools, a message intended to warn
+                       when the keyboard was being used because of the lack
+                       of a suitable random device was not being printed.
 
  892.  [bug]           The server could attempt to refresh a zone that
                        was being loaded, causing an assertion failure.
index 87c082359e9bd857ccc7f06685355f90745be029..f4669fb7445dbb501df10f56382f18b9fdb43f3d 100644 (file)
@@ -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);