]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
abort in srandomdev if kern.arandom sysctl fails
authoremaste <emaste@FreeBSD.org>
Wed, 5 Oct 2016 17:03:22 +0000 (17:03 +0000)
committeremaste <emaste@FreeBSD.org>
Wed, 5 Oct 2016 17:03:22 +0000 (17:03 +0000)
commit40987e0fd95fb3ffe4918780aba5d53467eab4db
treee020c8e1528814698d2a752124a697c4c03e4a06
parentfe2c9dd8ad3f27c4d55e00a362f8934c3c3f4c5b
abort in srandomdev if kern.arandom sysctl fails

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.

While abort() is not normally suitable for a library, it makes sense
here.

This is akin to r306636 for arc4random.

Reviewed by: ed
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8077
lib/libc/stdlib/random.c