aboutsummaryrefslogtreecommitdiffstats
path: root/main/rng-tools/02-fix-list-for-enabled-sources.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/rng-tools/02-fix-list-for-enabled-sources.patch')
-rw-r--r--main/rng-tools/02-fix-list-for-enabled-sources.patch62
1 files changed, 0 insertions, 62 deletions
diff --git a/main/rng-tools/02-fix-list-for-enabled-sources.patch b/main/rng-tools/02-fix-list-for-enabled-sources.patch
deleted file mode 100644
index 480b9fdd60..0000000000
--- a/main/rng-tools/02-fix-list-for-enabled-sources.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From: Dermot Bradley <dermot_bradley@yahoo.com>
-Date: Thu, 21 Jan 2021 19:47 +0000
-Subject: [PATCH] Add output to list option for entropy sources that failed init
-
-When we --list entropy source, it may be that a source is enabled at build
-time, but fails at run time due to lack of hw, etc. Those don't get
-reported with the --list option, so lets add them in for complete reporting.
-
-This patch is already present in upstream master and so can be removed
-in future after version update.
-
----
-
-diff -aur a/rngd.c b/rngd.c
---- a/rngd.c
-+++ b/rngd.c
-@@ -857,6 +857,7 @@
- found = 1;
- message(LOG_CONS|LOG_INFO, "%d: %s (%s)\n", i,
- entropy_sources[i].rng_name, entropy_sources[i].rng_sname);
-+ entropy_sources[i].failed_init = false;
- }
- if (!found)
- message(LOG_CONS|LOG_INFO, "None");
-@@ -874,9 +875,11 @@
- ent_src->fipsctx = malloc(sizeof(fips_ctx_t));
- fips_init(ent_src->fipsctx, discard_initial_data(ent_src));
- message_entsrc(ent_src, LOG_DAEMON|LOG_INFO, "Initialized\n");
-+ ent_src->failed_init = false;
- } else {
- message_entsrc(ent_src, LOG_DAEMON|LOG_ERR, "Initialization Failed\n");
- ent_src->disabled = true;
-+ ent_src->failed_init = true;
- }
- }
- }
-@@ -891,6 +894,14 @@
- message(LOG_CONS|LOG_INFO, "%d: %s (%s)\n", i,
- entropy_sources[i].rng_name, entropy_sources[i].rng_sname);
- }
-+ message(LOG_CONS|LOG_INFO, "Available entropy sources that failed initalization:\n");
-+ for (i=0; i < ENT_MAX; i++)
-+ if (entropy_sources[i].init && entropy_sources[i].disabled == true && entropy_sources[i].failed_init == true) {
-+ rc = 1;
-+ message(LOG_CONS|LOG_INFO, "%d: %s (%s)\n", i,
-+ entropy_sources[i].rng_name, entropy_sources[i].rng_sname);
-+ }
-+
- quiet = true;
- close_all_entropy_sources();
- return rc;
-diff -aur a/rngd.h b/rngd.h
---- a/rngd.h
-+++ b/rngd.h
-@@ -140,6 +140,7 @@
- char *rng_fname;
- int rng_fd;
- bool disabled;
-+ bool failed_init;
- int failures;
- int success;
- size_t ent_gathered;