From c549716739166bce675af94d64195ee2a093bb40 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Tue, 29 Nov 2016 11:30:52 -0800 Subject: [PATCH] [v9_10] log as error if entropy unavailable 4521. [cleanup] Log it as an error if an entropy source is not found and there is no fallback available. [RT #43659] (cherry picked from commit 6bdb70057d1505f86816b77edee8bc66c5e428ba) --- CHANGES | 3 +++ bin/named/server.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index f09f54d10b..9eade2b687 100644 --- 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. [RT #43755] diff --git a/bin/named/server.c b/bin/named/server.c index 2acf6e2a92..f8b10aead7 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -6344,13 +6344,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,