From dfe955413bbf85e5c2a05b08d6f919eab1561b31 Mon Sep 17 00:00:00 2001 From: Bandie Kojote Date: Tue, 17 Mar 2015 07:54:03 +0100 Subject: [PATCH] Additional exit codes added + better shredding --- sbin/grub2-sign | 10 +++++++++- sbin/grub2-unsign | 1 + sbin/grub2-verify | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sbin/grub2-sign b/sbin/grub2-sign index a7520b1..37778c9 100644 --- a/sbin/grub2-sign +++ b/sbin/grub2-sign @@ -40,4 +40,12 @@ do done # Shredding passphrase -pp=`cat /dev/urandom | tr -dc 'a-zA-Z0-9-!@#$%^&*()_+~' | fold -w ${#pp} | head -n 1` + +echo "Shredding passphrase..." +for ( i=0; $i<10; i++ ) +do + pp=`cat /dev/urandom | tr -dc 'a-zA-Z0-9-!@#$%^&*()_+~' | fold -w ${#pp} | head -n 1` +done + +echo "Done!" +exit 0 diff --git a/sbin/grub2-unsign b/sbin/grub2-unsign index 401d922..e31471b 100644 --- a/sbin/grub2-unsign +++ b/sbin/grub2-unsign @@ -19,3 +19,4 @@ do rm $i done echo "GRUB2 unsigned. WARNING: If you want to deactivate GRUB2's signature feature, change the check_signatures variable in the headers file!" +exit 0 diff --git a/sbin/grub2-verify b/sbin/grub2-verify index a8e30ef..03c1236 100644 --- a/sbin/grub2-verify +++ b/sbin/grub2-verify @@ -60,3 +60,6 @@ then else exit 0 fi + +# WHAT?! +exit 666