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:
parent
cc2fb303cb
commit
dbcd3e5f0a
@ -96,8 +96,7 @@ reload_random_seed() {
|
|||||||
local seed
|
local seed
|
||||||
local decoded
|
local decoded
|
||||||
seed=$(qubesdb-read /qubes-random-seed)
|
seed=$(qubesdb-read /qubes-random-seed)
|
||||||
decoded=$(echo "$seed" | base64 -d)
|
echo "$seed" | base64 -d > /dev/urandom
|
||||||
echo "$decoded" > /dev/urandom
|
|
||||||
qubesdb-rm /qubes-random-seed
|
qubesdb-rm /qubes-random-seed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user