From: Michael Vogt Date: Wed, 9 Jan 2013 05:57:13 +0000 (+0100) Subject: * debian/apt.cron.daily: X-Git-Tag: 0.9.8~53^2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/50816ce74432f24135aefc590361bbb8ccfc71f1?ds=inline;hp=--cc * debian/apt.cron.daily: - when reading from /dev/urandom, use less entropy and fix a rare bug when the random number chksum is less than 1000. Closes: #695285 --- 50816ce74432f24135aefc590361bbb8ccfc71f1 diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index 5c00f22db..27f08dd4a 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -289,7 +289,7 @@ random_sleep() fi if [ -z "$RANDOM" ] ; then # A fix for shells that do not have this bash feature. - RANDOM=$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -c"1-5") + RANDOM=$(dd if=/dev/urandom bs=2 count=1 2> /dev/null | cksum | cut -d' ' -f1 | cut -c"1-5") fi TIME=$(($RANDOM % $RandomSleep)) debug_echo "sleeping for $TIME seconds" diff --git a/debian/changelog b/debian/changelog index 02fcdaa8b..d08dd8038 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,10 @@ apt (0.9.7.8) UNRELEASED; urgency=low of e.g. apt-get update. While this adds new translatable strings, not having translations for them will not break anything. Thanks to Guillem Jover. Closes: #696225 + * debian/apt.cron.daily: + - when reading from /dev/urandom, use less entropy and fix a rare + bug when the random number chksum is less than 1000. + Closes: #695285 -- Christian Perrier Mon, 24 Dec 2012 07:01:20 +0100