On 12/28/22 22:04, Cristian Rodríguez wrote:
On Wed, Dec 28, 2022 at 5:57 PM Alejandro Colomar via Libc-alpha <libc-alpha@xxxxxxxxxxxxxx> wrote:Ahh, I didn't connect the dots the other day! We don't need to wait for glibc. libbsd already provides arc4random on GNU/Linux systems, so I can already recommend using arc4random to seed srand(3). I'll prepare a patch...I would suggest avoiding that, as it suffers from all the problems previously discussed on this list , on the relevant arc4random thread tl;dr , it can't be safe without kernel support, as you need to know when to drop the buffer. (on fork, on resume plus on $deity knows condition for which there is no kernel notification about)
Maybe I'd remove the SEE ALSO reference to arc4random(3bsd) then, so that I don't "recommend" using it. I'll add arc4random(3) to SEE ALSO when we have a manual page for the function.
-- <http://www.alejandro-colomar.es/>
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature