]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] log as error if entropy unavailable
authorEvan Hunt <each@isc.org>
Tue, 29 Nov 2016 19:30:31 +0000 (11:30 -0800)
committerEvan Hunt <each@isc.org>
Tue, 29 Nov 2016 19:30:31 +0000 (11:30 -0800)
4521. [cleanup] Log it as an error if an entropy source is not
found and there is no fallback available. [RT #43659]

CHANGES
bin/named/server.c

diff --git a/CHANGES b/CHANGES
index a9edd588269c4785a32a67d9c974043d9c132c74..b2e0c23849540f5e087c6018ee48e841688c9d62 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4521.  [cleanup]       Log it as an error if an entropy source is not
+                       found and there is no fallback available. [RT #43659]
+
 4520.  [cleanup]       Alphabetise more of the grammar when printing it
                        out. Fix unbalanced indenting. [RT #43755]
 
index 6cff5a9675e04e7f5010bc51ac271406308dde57..ef33ed5b416066384ed6913e64a0e262ef7296d4 100644 (file)
@@ -7733,13 +7733,18 @@ load_configuration(const char *filename, ns_server_t *server,
                                      "no source of entropy found");
                } else {
                        const char *randomdev = cfg_obj_asstring(obj);
+                       int level = ISC_LOG_ERROR;
                        result = isc_entropy_createfilesource(ns_g_entropy,
                                                              randomdev);
+#ifdef PATH_RANDOMDEV
+                       if (ns_g_fallbackentropy != NULL)
+                               level = ISC_LOG_INFO;
+#endif
                        if (result != ISC_R_SUCCESS)
                                isc_log_write(ns_g_lctx,
                                              NS_LOGCATEGORY_GENERAL,
                                              NS_LOGMODULE_SERVER,
-                                             ISC_LOG_INFO,
+                                             level,
                                              "could not open entropy source "
                                              "%s: %s",
                                              randomdev,