mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-25 06:07:38 +00:00
fix to key password verification
last minute bug slipped in: it doesn't recognizes correct passwords in some strange situations where gnupg doesn't returns correctly (for instance when a .gnupg dir is not found in home)
This commit is contained in:
parent
8ad87f2233
commit
361a194700
15
tomb
15
tomb
@ -600,12 +600,16 @@ get_lukskey() {
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
res=`safe_filename tomb.open`
|
||||
(( $? )) && { unset tombpass; die "error creating temp dir" }
|
||||
|
||||
print ${tombpass} | \
|
||||
gpg --batch --passphrase-fd 0 --no-tty --no-options --status-fd 2 \
|
||||
-d "${keyfile}" 2> /dev/null
|
||||
ret=$?
|
||||
xxx "gpg decryption returns $ret"
|
||||
-d "${keyfile}" 2>$res
|
||||
unset tombpass
|
||||
grep 'DECRYPTION_OKAY' $res
|
||||
ret=$?; rm -f $res
|
||||
xxx "get_lukskey returns $ret"
|
||||
return $ret
|
||||
}
|
||||
|
||||
@ -983,10 +987,9 @@ lock_tomb_with_key() {
|
||||
tombname=${tombfile%%\.*}
|
||||
tombfile=${tombname}.tomb
|
||||
|
||||
if ! [ -e ${tombdir}/${tombfile} ]; then
|
||||
{ test -f ${tombdir}/${tombfile} } || {
|
||||
die "There is no tomb here. You have to it dig first."
|
||||
return 1
|
||||
fi
|
||||
return 1 }
|
||||
|
||||
xxx "tomb found: ${tombdir}/${tombfile}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user