The attached patch should apply cleanly to the Debian urandom.

My apologies for attaching the wrong patch previously.  I picked
up the Ubuntu patch instead of the Debian patch.


>From 65227bb7a4a335f7ef1332b2b19aada059502238 Mon Sep 17 00:00:00 2001
From: John Denker <j...@av8n.com>
Date: Sat, 11 Sep 2010 09:17:32 -0700
Subject: [PATCH] Remove code that tried to write to the read-only file /proc/sys/kernel/random/poolsize This code was added in 2004 and has never worked.

---
 urandom |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/urandom b/urandom
index 1662859..f5b4bcb 100755
--- a/urandom
+++ b/urandom
@@ -27,13 +27,6 @@ case "$1" in
 	# which is the size of the entropy pool
 	if [ -f "$SAVEDFILE" ]
 	then
-		# Handle locally increased pool size
-		SAVEDSIZE="$(find "$SAVEDFILE" -printf "%s")"
-		if [ "$SAVEDSIZE" -gt "$POOLSIZE" ]
-		then
-			[ -w /proc/sys/kernel/random/poolsize ] && echo $POOLSIZE > /proc/sys/kernel/random/poolsize
-			POOLSIZE=$SAVEDSIZE
-		fi
 		cat "$SAVEDFILE" >/dev/urandom
 	fi
 	rm -f $SAVEDFILE
-- 
1.5.6.5

Reply via email to