[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#695285: /etc/cron.daily/apt backup RNG is very wasteful



On Thu, Dec 06, 2012 at 11:45:40AM -0500, sacrificial-spam-address@horizon.com wrote:
> Package: apt
> Version: 0.9.7.6
> Severity: minor
 
Thanks for your bugreport.

[..]
> This backup for a missing $RANDOM reads 512 bytes out of /dev/urandom, only
> to reduce it (incorrectly) to a 5-digit number (16.6 bits max, although
> the distribution is skewed), then to 10.8 bits (modulo 1800).
> 
> It's incorrect because cksum produces a 32-bit checksum, formatted as
> "%u", so some small fraction of the time (1 in 4.3 million times), it'll
> be less than 1000 and the cut will produce a result of the form "123 4", causing the evaluation
> of TIME to fail.

Thanks, I fixed this now in my bzr tree and it will be part of the
next upload.


Cheers,
 Michael


Reply to: