summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorey Hinshaw2018-10-10 21:24:02 -0400
committerCorey Hinshaw2018-10-10 21:24:02 -0400
commit22e847f53080db5c11f8391273e2f28a21c596d4 (patch)
tree322c180d5b8462d3a5a1ef0d1932c1efb34d3db4
parentc63b4650d320be9c3b247c130fbe39aa9ae66170 (diff)
downloadaur-22e847f53080db5c11f8391273e2f28a21c596d4.tar.gz
Fix stderr redirection for certain commands
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--hook_tpm26
3 files changed, 7 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e8800647b4e6..a5e238d76f3c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = mkinitcpio-tpm2-encrypt
pkgdesc = mkinitcpio hook that decrypts a TPM2-sealed LUKS keyfile
- pkgver = 1.2
+ pkgver = 1.2.1
pkgrel = 1
url = https://aur.archlinux.org/packages/mkinitcpio-tpm2-encrypt/
arch = any
@@ -11,7 +11,7 @@ pkgbase = mkinitcpio-tpm2-encrypt
source = hook_tpm2
source = README.md
sha256sums = baf4e8d7a5385bdc5dda1a4b8148da510c35d632f27470951ab84c8c82b2e554
- sha256sums = 93f1fb0ac7539480d434ee76ccbef1f0953e15d6700be8be67273c5bfaeb79dd
+ sha256sums = 389bae75e8e1d4bf63cf4e00a44f879a34416ff64fc0401ada817d1bea182639
sha256sums = 153e368c88f6ad45befc6593c7b00995f1656674149d8ec55659ebd6a91a1a51
pkgname = mkinitcpio-tpm2-encrypt
diff --git a/PKGBUILD b/PKGBUILD
index 3928dfd962cd..be26b4150a8e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Corey Hinshaw <coreyhinshaw(at)gmail(dot)com>
pkgname=mkinitcpio-tpm2-encrypt
-pkgver=1.2
+pkgver=1.2.1
pkgrel=1
pkgdesc="mkinitcpio hook that decrypts a TPM2-sealed LUKS keyfile"
url="https://aur.archlinux.org/packages/mkinitcpio-tpm2-encrypt/"
@@ -12,7 +12,7 @@ source=('install_tpm2'
'hook_tpm2'
'README.md')
sha256sums=('baf4e8d7a5385bdc5dda1a4b8148da510c35d632f27470951ab84c8c82b2e554'
- '93f1fb0ac7539480d434ee76ccbef1f0953e15d6700be8be67273c5bfaeb79dd'
+ '389bae75e8e1d4bf63cf4e00a44f879a34416ff64fc0401ada817d1bea182639'
'153e368c88f6ad45befc6593c7b00995f1656674149d8ec55659ebd6a91a1a51')
package() {
diff --git a/hook_tpm2 b/hook_tpm2
index 53380262a39b..7ec139dceaa8 100644
--- a/hook_tpm2
+++ b/hook_tpm2
@@ -97,7 +97,7 @@ EOF
# Load key object if stored on disk
tpmload=0
if [ -z "$tpmkeyindex" ]; then
- tpm2_load -Q -H "$tpmkeyparent" -r "$tpmkeypriv" -u "$tpmkeypub" -C /tpmobject.ctx -T "device:${tpmdev}" 2>&1 >/dev/null
+ tpm2_load -Q -H "$tpmkeyparent" -r "$tpmkeypriv" -u "$tpmkeypub" -C /tpmobject.ctx -T "device:${tpmdev}" >/dev/null 2>&1
tpmload=$?
fi
@@ -155,7 +155,7 @@ EOF
if [ -n "$pcrextendnum" ] && [ -n "$pcrextendalg" ]; then
case "$pcrextendalg" in
sha1|sha224|sha256|sha384|sha512)
- tpm2_pcrextend -T "device:${tpmdev}" ${pcrextendnum}:${pcrextendalg}=$("${pcrextendalg}sum" /hooks/tpm2 2>/dev/null | cut -f1 -d' ') 2>&1 >/dev/null
+ tpm2_pcrextend -T "device:${tpmdev}" ${pcrextendnum}:${pcrextendalg}=$("${pcrextendalg}sum" /hooks/tpm2 2>/dev/null | cut -f1 -d' ') >/dev/null 2>&1
if [ $? -ne 0 ]; then
err "Could not extend TPM PCR"
fi
@@ -173,7 +173,7 @@ EOF
run_cleanuphook() {
# Securely delete key if still present
if [ -f "$ckeyfile" ]; then
- dd if=/dev/urandom of="$ckeyfile" bs=$(stat --printf="%s" "$ckeyfile") count=1 conv=notrunc 2>&1 >/dev/null
+ dd if=/dev/urandom of="$ckeyfile" bs=$(stat --printf="%s" "$ckeyfile") count=1 conv=notrunc >/dev/null 2>&1
rm -f "$ckeyfile"
fi
}