chrony/test/unit
Miroslav Lichvar a0a9560258 util: reset GetRandom functions in helpers after fork
Close /dev/urandom and drop cached getrandom() data after forking helper
processes to avoid them getting the same sequence of random numbers
(e.g. two NTS-KE helpers generating cookies with identical nonces).
arc4random() is assumed to be able to detect forks and reseed
automatically.

This is not strictly necessary with the current code, which does not use
the GetRandom functions before the NTS-KE helper processes are forked,
but that could change in future.

Also, call the reset function before exit to close /dev/urandom in order
to avoid valgrind reporting the file object as "still reachable".
2021-11-24 11:17:24 +01:00
..
addrfilt.c test: fix DEBUG_LOG use in unit tests 2017-03-13 12:04:26 +01:00
clientlog.c clientlog: undo clock adjustments in updated TX timestamps 2021-10-27 16:22:12 +02:00
cmac.c cmac+hash: change parameter types 2020-07-09 14:47:33 +02:00
hash.c hash: allow non-security MD5 use in FIPS mode 2021-09-02 15:17:08 +02:00
hwclock.c update copyright years 2018-09-12 11:38:10 +02:00
keys.c ntp: drop precompensation of TX timestamp 2020-07-09 14:46:57 +02:00
Makefile.in test: disable object dependencies in main makefile 2020-06-08 15:27:57 +02:00
ntp_auth.c ntp: move initial packet parsing from ntp_auth to ntp_core 2021-11-16 10:00:31 +01:00
ntp_core.c ntp: move initial packet parsing from ntp_auth to ntp_core 2021-11-16 10:00:31 +01:00
ntp_core.keys test: include CMAC keys in ntp_core unit test 2020-09-23 15:10:43 +02:00
ntp_ext.c test: add ntp_ext unit test 2020-03-05 16:02:15 +01:00
ntp_sources.c update copyright years 2021-05-12 13:06:15 +02:00
nts_ke.crt test: add nts unit tests 2020-03-05 16:02:15 +01:00
nts_ke.key test: add nts unit tests 2020-03-05 16:02:15 +01:00
nts_ke_client.c nts: add support for multiple sets of trusted certificates 2021-02-18 17:44:04 +01:00
nts_ke_server.c nts: fix error response to NTS-KE request 2020-07-23 15:53:24 +02:00
nts_ke_session.c nts: add support for multiple sets of trusted certificates 2021-02-18 17:44:04 +01:00
nts_ntp_auth.c nts: check for negative length in NNA_DecryptAuthEF() 2020-07-09 14:47:33 +02:00
nts_ntp_client.c nts: add support for multiple sets of trusted certificates 2021-02-18 17:44:04 +01:00
nts_ntp_server.c nts: improve NTS-KE server/client code 2020-07-16 16:02:08 +02:00
regress.c test: add regress unit test 2017-06-27 15:29:01 +02:00
samplefilt.c sources: update stratum with leap status 2021-02-04 17:43:47 +01:00
siv.c siv: return error if key is not set 2020-09-10 09:36:35 +02:00
smooth.c main: don't require root privileges with -Q option 2017-07-13 16:10:54 +02:00
sources.c sources: update stratum with leap status 2021-02-04 17:43:47 +01:00
test.c test: fix incorrect use of RAND_MAX 2021-09-23 15:51:35 +02:00
test.h test: drop logging suspension 2021-03-11 11:47:31 +01:00
util.c util: reset GetRandom functions in helpers after fork 2021-11-24 11:17:24 +01:00