From 319d2a7b60cc0d06bb5c29684c23475d41a7f8b7 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 9 Apr 2020 21:21:16 +0000 Subject: Add GRND_INSECURE from Linux 5.6 to sys/random.h This patch adds the GRND_INSECURE constant from Linux 5.6 to glibc's sys/random.h. This is also added to the documentation. The constant acts as a no-op for the Hurd implementation (as that doesn't check whether the flags are known), which is semantically fine, while older Linux kernels reject unknown flags with an EINVAL error. Tested for x86_64. --- manual/crypt.texi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'manual') diff --git a/manual/crypt.texi b/manual/crypt.texi index c41b911..af23dd7 100644 --- a/manual/crypt.texi +++ b/manual/crypt.texi @@ -301,6 +301,9 @@ booted and the randomness source has not yet been initialized. @item GRND_NONBLOCK Instead of blocking, return to the caller immediately if no data is available. + +@item GRND_INSECURE +Write random data that may not be cryptographically secure. @end table Unlike @code{getentropy}, the @code{getrandom} function is a -- cgit v1.1