From ea38eff0f92c0abd863e418c0bef71b0f99f9398 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Sat, 14 Jun 2014 18:01:41 +0000 Subject: [PATCH] Change return value of getentropy() to int 0 for success. Maximum buffersize is enforced strictly, this supplies sufficient entropy payload to act as seed material. Discourage general use of this API, but lock down this function name as the go-to for userland PRNG seeding. Improve documentation. ok miod matthew --- src/include/unistd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/unistd.h b/src/include/unistd.h index 9913e426..9f4bb83d 100644 --- a/src/include/unistd.h +++ b/src/include/unistd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: unistd.h,v 1.87 2014/06/13 08:26:10 deraadt Exp $ */ +/* $OpenBSD: unistd.h,v 1.88 2014/06/14 18:01:41 deraadt Exp $ */ /* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */ /*- @@ -538,7 +538,7 @@ void setusershell(void); int strtofflags(char **, u_int32_t *, u_int32_t *); int swapctl(int cmd, const void *arg, int misc); int syscall(int, ...); -ssize_t getentropy(void *, size_t); +int getentropy(void *, size_t); pid_t __tfork_thread(const struct __tfork *, size_t, void (*)(void *), void *); #endif /* __BSD_VISIBLE */