OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Want to help upstream software improve their random?

From: Kamil Rytarowski (n54gmx.com)
Date: Sun Dec 14 2014 - 16:25:22 CST


> Sent: Friday, December 12, 2014 at 5:02 AM
> From: "Theo de Raadt" <deraadtcvs.openbsd.org>
> To: techcvs.openbsd.org
> Subject: Want to help upstream software improve their random?
>

Not my business, but how do you handle cases of rand() & srand()-like
calls from software like awk?

What is and what should be the result of:
for w in `seq 1 10`; do awk 'BEGIN{print int(rand() * 32767)}'; done

or

for w in `seq 1 10`; do awk 'BEGIN{srand(); print int(rand() * 32767)}'; done