getrandom: add helper for getrandom() syscall
authorEtienne CHAMPETIER <[email protected]>
Thu, 9 Jun 2016 13:03:00 +0000 (13:03 +0000)
committerJohn Crispin <[email protected]>
Tue, 7 Jun 2016 22:19:24 +0000 (00:19 +0200)
commitfdda69207d1509e0383e3da549f71666b194c40a
tree5f7ab6863fe9ea8a9729a535129cbb970d8b80c1
parentfd4bb41ee7ab136d25609c2a917beea5d52b723b
getrandom: add helper for getrandom() syscall

getrandom() was introduced in version 3.17 of the Linux kernel.
By default getrandom() block until /dev/urandom pool has been initialized
and then read from it.
Read buffer is 256 bytes so getrandom() calls always succeed.

First usage will be to save a seed for /dev/urandom.

Signed-off-by: Etienne CHAMPETIER <[email protected]>
CMakeLists.txt
getrandom.c [new file with mode: 0644]