]> git.ipfire.org Git - thirdparty/suricata.git/commit
util-random: workaround getrandom unavailability 3384/head
authorEric Leblond <eric@regit.org>
Wed, 23 May 2018 06:57:13 +0000 (08:57 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 23 May 2018 12:51:14 +0000 (14:51 +0200)
commit851efd9c60eaa30d8843f935c1445d91ddd86d68
tree164488c3f85576af94256c9617ece8a974269afa
parentd73b5ee276c336f406f52d9711c2f23bff21f5c2
util-random: workaround getrandom unavailability

getrandom syscall availability is detected at runtime. So it is
possible that the build is done on a box that supports it but
the run is done on a system with no availability. So a workaround
solution is needed to fix this case.

Also we have seen some issue in docker environment where the build
is detecting getrandom but where it does not work at runtime.

For both reasons, the code is updated to have a call to a fallback
function if ever the getrandom call returns that the syscall is
not available.
src/util-random.c