From 308ab98b58cc6ea92bae8f6713bbd55e003d38d1 Mon Sep 17 00:00:00 2001 From: millert Date: Sun, 3 Aug 2008 21:53:12 +0000 Subject: [PATCH] Don't print a warning when the random device cannot be opened if we have a pre-chroot random device. OK deraadt@ kettenis@ --- usr.sbin/bind/bin/named/server.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/usr.sbin/bind/bin/named/server.c b/usr.sbin/bind/bin/named/server.c index 83645b1e516..fb4e1c0895d 100644 --- a/usr.sbin/bind/bin/named/server.c +++ b/usr.sbin/bind/bin/named/server.c @@ -3110,15 +3110,6 @@ load_configuration(const char *filename, ns_server_t *server, const char *randomdev = cfg_obj_asstring(obj); result = isc_entropy_createfilesource(ns_g_entropy, randomdev); - if (result != ISC_R_SUCCESS) - isc_log_write(ns_g_lctx, - NS_LOGCATEGORY_GENERAL, - NS_LOGMODULE_SERVER, - ISC_LOG_INFO, - "could not open entropy source " - "%s: %s", - randomdev, - isc_result_totext(result)); #ifdef PATH_RANDOMDEV if (ns_g_fallbackentropy != NULL) { if (result != ISC_R_SUCCESS) { @@ -3134,8 +3125,17 @@ load_configuration(const char *filename, ns_server_t *server, &ns_g_entropy); } isc_entropy_detach(&ns_g_fallbackentropy); - } + } else #endif + if (result != ISC_R_SUCCESS) + isc_log_write(ns_g_lctx, + NS_LOGCATEGORY_GENERAL, + NS_LOGMODULE_SERVER, + ISC_LOG_INFO, + "could not open entropy source " + "%s: %s", + randomdev, + isc_result_totext(result)); } } -- 2.20.1