From f34324d947b29b5a35a325bbd3901294355b4f39 Mon Sep 17 00:00:00 2001 From: bcook <> Date: Sun, 20 Jul 2014 20:51:13 +0000 Subject: Move more OS-specific functionality to arc4random.h headers. Move and raise(SIGKILL) calls to OS-specific headers. On OpenBSD, move thread_private.h as well to arc4random.h. On Windows, use TerminateProcess on getentropy failure. ok deraadt@ --- src/lib/libc/crypt/arc4random.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/lib/libc/crypt/arc4random.h') diff --git a/src/lib/libc/crypt/arc4random.h b/src/lib/libc/crypt/arc4random.h index d867687226..d29873cca4 100644 --- a/src/lib/libc/crypt/arc4random.h +++ b/src/lib/libc/crypt/arc4random.h @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random.h,v 1.2 2014/07/19 00:08:41 deraadt Exp $ */ +/* $OpenBSD: arc4random.h,v 1.3 2014/07/20 20:51:13 bcook Exp $ */ /* * Copyright (c) 1996, David Mazieres @@ -21,6 +21,17 @@ /* * Stub functions for portability. */ +#include + +#include + +#include "thread_private.h" + +static inline void +_getentropy_fail(void) +{ + raise(SIGKILL); +} static inline int _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) -- cgit v1.2.3-55-g6feb