Blame SOURCES/dnsmasq-2.78-fips.patch

53807b
From 7b1cce1d0bdb61c09946978d4bdeb05a3cd4202a Mon Sep 17 00:00:00 2001
53807b
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
53807b
Date: Fri, 2 Mar 2018 13:17:04 +0100
53807b
Subject: [PATCH] Print warning on FIPS machine with dnssec enabled. Dnsmasq
53807b
 has no proper FIPS 140-2 compliant implementation.
53807b
53807b
---
53807b
 src/dnsmasq.c | 6 +++++-
53807b
 1 file changed, 5 insertions(+), 1 deletion(-)
53807b
53807b
diff --git a/src/dnsmasq.c b/src/dnsmasq.c
53807b
index 480c5f9..5fd229e 100644
53807b
--- a/src/dnsmasq.c
53807b
+++ b/src/dnsmasq.c
53807b
@@ -187,6 +187,7 @@ int main (int argc, char **argv)
53807b
       
53807b
       if (daemon->cachesize < CACHESIZ)
53807b
 	die(_("cannot reduce cache size from default when DNSSEC enabled"), NULL, EC_BADCONF);
53807b
+           
53807b
 #else 
53807b
       die(_("DNSSEC not available: set HAVE_DNSSEC in src/config.h"), NULL, EC_BADCONF);
53807b
 #endif
53807b
@@ -786,7 +787,10 @@ int main (int argc, char **argv)
53807b
 	my_syslog(LOG_INFO, _("DNSSEC validation enabled but all unsigned answers are trusted"));
53807b
       else
53807b
 	my_syslog(LOG_INFO, _("DNSSEC validation enabled"));
53807b
-      
53807b
+
53807b
+      if (access("/etc/system-fips", F_OK) == 0)
53807b
+        my_syslog(LOG_WARNING, _("DNSSEC support is not FIPS 140-2 compliant"));
53807b
+
53807b
       daemon->dnssec_no_time_check = option_bool(OPT_DNSSEC_TIME);
53807b
       if (option_bool(OPT_DNSSEC_TIME) && !daemon->back_to_the_future)
53807b
 	my_syslog(LOG_INFO, _("DNSSEC signature timestamps not checked until receipt of SIGINT"));
53807b
-- 
53807b
2.14.4
53807b