Home GnuPG

random: Make sure to re-open /dev/random after a fork

Description

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: T3491
  • Signed-off-by: Werner Koch <wk@gnupg.org>