]> git.ipfire.org Git - thirdparty/shadow.git/commit
libmisc/salt.c: Use secure system ressources to obtain random bytes. 380/head
authorBjörn Esser <besser82@fedoraproject.org>
Sun, 4 Jul 2021 10:10:11 +0000 (12:10 +0200)
committerBjörn Esser <besser82@fedoraproject.org>
Sun, 4 Jul 2021 11:00:32 +0000 (13:00 +0200)
commitc82ed0c15e0e9e47df0b4c22672b72e35f061a9d
tree299d1306b677313b93f53b90fb91862d036d9c8b
parent9eb191edc4a625bb68e827b18638f5b5816cb30c
libmisc/salt.c: Use secure system ressources to obtain random bytes.

In a previous commit we introduced /dev/urandom as a source to obtain
random bytes from.  This may not be available on all systems, or when
operating inside of a chroot.

Almost all systems provide functions to obtain random bytes from
secure system ressources.  Thus we should prefer to use these, and
fall back to /dev/urandom, if there is no such function present, as
a last resort.

Signed-off-by: Björn Esser <besser82@fedoraproject.org>
configure.ac
libmisc/salt.c