aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/rng/system_rng/system_rng.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/rng/system_rng/system_rng.cpp b/src/lib/rng/system_rng/system_rng.cpp
index eaba38241..12b087661 100644
--- a/src/lib/rng/system_rng/system_rng.cpp
+++ b/src/lib/rng/system_rng/system_rng.cpp
@@ -135,8 +135,11 @@ void System_RNG_Impl::add_entropy(const uint8_t input[], size_t len)
* by the OS or sysadmin that additional entropy is not wanted
* in the system pool, so we accept that and return here,
* since there is no corrective action possible.
+ *
+ * In Linux EBADF or EPERM is returned if m_fd is not opened for
+ * writing.
*/
- if(errno == EPERM)
+ if(errno == EPERM || errno == EBADF)
return;
// maybe just ignore any failure here and return?