random stuff (literally)

Robert Connolly robert at linuxfromscratch.org
Thu Oct 16 09:51:33 PDT 2008


On Thursday October 16 2008 03:35:39 am Jan Dvorak wrote:
> > I added patches yesterday and today to make Bash use /dev/urandom for
> > $RANDOM,
>
> mordae at dvorak:~$ RANDOM=1
> mordae at dvorak:~$ echo $RANDOM
> 16838
> mordae at dvorak:~$ echo $RANDOM
> 5758
> mordae at dvorak:~$ RANDOM=2
> mordae at dvorak:~$ echo $RANDOM
> 908
> mordae at dvorak:~$ RANDOM=1
> mordae at dvorak:~$ echo $RANDOM
> 16838
> mordae at dvorak:~$ echo $RANDOM
> 5758
>
> So throw the patch away, you are screwing things. It's documented and must
> behave like this. If you want to use it with arc4random(), you must ensure
> that once it's seeded by a number, old behavior returns.

The old arc4random patch, and this /dev/urandom patch, both keep the old Korn 
behavior.

robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20081016/736eed5c/attachment.sig>


More information about the hlfs-dev mailing list