On 17 February 2017 at 14:05, Daniel P. Berrange <berra...@redhat.com> wrote: > On Fri, Feb 17, 2017 at 12:22:39PM +0000, Peter Maydell wrote: >> We should probably improve crypto/random-platform.c to use >> getentropy() if available, which would fix the "BSD or OSX >> host and not using gcrypt or gnutls" case which I think is >> the most likely cause of qcrypto_random_bytes() failing. > > randopm-platform.c currentl uses /dev/urandom or /dev/random, > so that should work when GNUTLS/gcrypt are both disabled at > build time.
Ah, and OSX and the BSDs have those devices. (I had mistakenly assumed they were a linuxism.) > What would fail, is uses it from a chroot with an empty /dev > of course. Yes; replacing the rand() in linux-user/main.c would require this I think (unless we're willing to fall back to rand ;-)) thanks -- PMM