From 0ac5a34c200fa32ca34368b81678e1d1a318134d Mon Sep 17 00:00:00 2001 From: Jaromil Date: Tue, 29 Dec 2020 10:56:20 +0100 Subject: [PATCH] close luks mapper and end with an error on lock format failures --- tomb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tomb b/tomb index 1786b54..c68fa65 100755 --- a/tomb +++ b/tomb @@ -2043,7 +2043,8 @@ lock_tomb_with_key() { [[ $? == 0 ]] || { _warning "Tomb format returned an error." - _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } + _sudo cryptsetup luksClose tomb.tmp + _failure "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } # Sync _sudo cryptsetup luksClose tomb.tmp