summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libc/crypt/arc4random.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libc/crypt/arc4random.c b/src/lib/libc/crypt/arc4random.c
index 985fa8a0e5..ea05d2a6e9 100644
--- a/src/lib/libc/crypt/arc4random.c
+++ b/src/lib/libc/crypt/arc4random.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: arc4random.c,v 1.35 2014/06/19 00:13:22 matthew Exp $ */ 1/* $OpenBSD: arc4random.c,v 1.36 2014/06/20 00:02:12 matthew Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1996, David Mazieres <dm@uun.org> 4 * Copyright (c) 1996, David Mazieres <dm@uun.org>
@@ -24,6 +24,7 @@
24 24
25#include <fcntl.h> 25#include <fcntl.h>
26#include <limits.h> 26#include <limits.h>
27#include <signal.h>
27#include <stdlib.h> 28#include <stdlib.h>
28#include <string.h> 29#include <string.h>
29#include <unistd.h> 30#include <unistd.h>
@@ -91,8 +92,8 @@ _rs_stir(void)
91{ 92{
92 u_char rnd[KEYSZ + IVSZ]; 93 u_char rnd[KEYSZ + IVSZ];
93 94
94 /* XXX */ 95 if (getentropy(rnd, sizeof rnd) == -1)
95 (void) getentropy(rnd, sizeof rnd); 96 raise(SIGKILL);
96 97
97 if (!rs) 98 if (!rs)
98 _rs_init(rnd, sizeof(rnd)); 99 _rs_init(rnd, sizeof(rnd));