HomeFreeBSD

libc arc4_stir: use only kern.arandom sysctl

Description

libc arc4_stir: use only kern.arandom sysctl

The sysctl cannot fail. If it does fail on some FreeBSD derivative or
after some future change, just abort() so that the problem will be found
and fixed.

It's preferable to provide an arc4random() function that cannot fail and
cannot return poor quality random data. While abort() is not normally
suitable for a library, it makes sense here.

Reviewed by: ed, jonathan, markm
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8077

Details

Provenance
emasteAuthored on
Reviewer
ed
Differential Revision
D8077: libc arc4_stir: use only kern.arandom sysctl
Parents
rS306635: MFC r306228:
Branches
Unknown
Tags
Unknown