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 '-').
This commit is contained in:
Marek Marczykowski-Górecki 2016-11-17 09:30:49 +01:00
parent cc2fb303cb
commit dbcd3e5f0a
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -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
}