random: Make sure to re-open /dev/random after a fork
authorWerner Koch <wk@gnupg.org>
Fri, 26 Oct 2018 11:22:16 +0000 (13:22 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 26 Oct 2018 11:22:16 +0000 (13:22 +0200)
commit319f55e6e5793c59f1ba4cfe481b562bca42194d
tree838e39e34964158d81dedbe66e5e17a575f441ec
parent2e2e68ad4874a4678cfbe452b70ae987e0402eca
random: Make sure to re-open /dev/random after a fork

* random/rndlinux.c (_gcry_rndlinux_gather_random): Detect fork and
re-open devices.
--

This mitigates about ill-behaving software which has closed the
standard fds but later dups them to /dev/null.

GnuPG-bug-id: 3491
Signed-off-by: Werner Koch <wk@gnupg.org>
random/rndlinux.c