summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/rng-tools/rng-tools/0001-rngd_jitter-fix-O_NONBLOCK-setting-for-entropy-pipe.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/rng-tools/rng-tools/0001-rngd_jitter-fix-O_NONBLOCK-setting-for-entropy-pipe.patch')
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/0001-rngd_jitter-fix-O_NONBLOCK-setting-for-entropy-pipe.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-support/rng-tools/rng-tools/0001-rngd_jitter-fix-O_NONBLOCK-setting-for-entropy-pipe.patch b/meta/recipes-support/rng-tools/rng-tools/0001-rngd_jitter-fix-O_NONBLOCK-setting-for-entropy-pipe.patch
new file mode 100644
index 0000000000..3b44095cf5
--- /dev/null
+++ b/meta/recipes-support/rng-tools/rng-tools/0001-rngd_jitter-fix-O_NONBLOCK-setting-for-entropy-pipe.patch
@@ -0,0 +1,26 @@
1From 6ce86cb5cf06541cd5aad70fe8494b07b22c247e Mon Sep 17 00:00:00 2001
2From: Matthias Schiffer <matthias.schiffer@tq-group.com>
3Date: Wed, 27 Jan 2021 16:10:32 +0100
4Subject: [PATCH] rngd_jitter: fix O_NONBLOCK setting for entropy pipe
5
6A pointer was passed to fcntl instead of the flags variable, setting
7random flags.
8
9Signed-off-by: Matthias Schiffer <matthias.schiffer@tq-group.com>
10---
11 rngd_jitter.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/rngd_jitter.c b/rngd_jitter.c
15index 32bac53..25b3543 100644
16--- a/rngd_jitter.c
17+++ b/rngd_jitter.c
18@@ -465,7 +465,7 @@ int init_jitter_entropy_source(struct rng *ent_src)
19
20 flags = fcntl(pipefds[0], F_GETFL, 0);
21 flags |= O_NONBLOCK;
22- fcntl(pipefds[0], F_SETFL, &flags);
23+ fcntl(pipefds[0], F_SETFL, flags);
24
25 if (ent_src->rng_options[JITTER_OPT_USE_AES].int_val) {
26 #ifdef HAVE_LIBGCRYPT