]> git.ipfire.org Git - thirdparty/systemd.git/commit
random-util: introduce RANDOM_DONT_DRAIN
authorLennart Poettering <lennart@poettering.net>
Wed, 7 Nov 2018 18:31:39 +0000 (19:31 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 8 Nov 2018 08:44:27 +0000 (09:44 +0100)
commit6fb6f13896b13e8a5afee30ebec110dd1c8f1b29
tree0147b83664179fb1a25babd6d42d2f7a5bebb703
parent776cf7461fa54445a40df17c40cfd024b6f09578
random-util: introduce RANDOM_DONT_DRAIN

Originally, the high_quality_required boolean argument controlled two
things: whether to extend any random data we successfully read with
pseudo-random data, and whether to return -ENODATA if we couldn't read
any data at all.

The boolean got replaced by RANDOM_EXTEND_WITH_PSEUDO, but this name
doesn't really cover the second part nicely. Moreover hiding both
changes of behaviour under a single flag is confusing. Hence, let's
split this part off under a new flag, and use it from random_bytes().
src/basic/random-util.c
src/basic/random-util.h