[PATCH] Use arc4random() to permutate talloc_magic number
Timur I. Bakeyev
timur at freebsd.org
Wed Feb 14 02:59:11 UTC 2018
I've noticed that talloc testsuite fails on FreeBSD cause talloc_magic is
always a predictable number, derived from the function address of the
loaded library, which is unfortunately always the same(contrary to OpenBSD,
for example). The existing talloc code uses Linux/glibc specific calls to
obtaining random bytes to permutate talloc_magic. *BSD has their own set of
arc4* functions that can provide cryptographically applicable PRNG.
So, this small patch adds support for the usage of arc4random() to obtain
random talloc_magic signature per invocation.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1547 bytes
Desc: not available
More information about the samba-technical