From dbcd3e5f0ad71e527f4b160c1d5dff11bea73a68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 17 Nov 2016 09:30:49 +0100 Subject: [PATCH] Write random seed directly to /dev/urandom Don't store it in some variable, as may contain non-ASCII or control characters (or starts with '-'). --- init/functions | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/init/functions b/init/functions index 07d5eb4..7aff2a3 100644 --- a/init/functions +++ b/init/functions @@ -96,8 +96,7 @@ reload_random_seed() { local seed local decoded seed=$(qubesdb-read /qubes-random-seed) - decoded=$(echo "$seed" | base64 -d) - echo "$decoded" > /dev/urandom + echo "$seed" | base64 -d > /dev/urandom qubesdb-rm /qubes-random-seed }