mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-19 19:15:14 +00:00
Merge pull request #48 from boyska/fix_47_gpgpwd
FIX #47: handling of special chars in password
This commit is contained in:
commit
86db18b386
12
src/tomb
12
src/tomb
@ -460,9 +460,9 @@ create_tomb() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
print "${tombpass}" | gpg \
|
gpg \
|
||||||
--openpgp --batch --no-options --no-tty --passphrase-fd 0 2>/dev/null \
|
--openpgp --batch --no-options --no-tty --passphrase-fd 0 2>/dev/null \
|
||||||
-o "${tombkey}" -c -a ${keytmp}/tomb.tmp
|
-o "${tombkey}" -c -a ${keytmp}/tomb.tmp <<< ${tombpass}
|
||||||
|
|
||||||
# if [ $? != 0 ]; then
|
# if [ $? != 0 ]; then
|
||||||
# error "setting password failed: gnupg returns 2"
|
# error "setting password failed: gnupg returns 2"
|
||||||
@ -616,11 +616,9 @@ mount_tomb() {
|
|||||||
else
|
else
|
||||||
tombpass=`exec_as_user ${TOMBEXEC} askpass "$keyname (retry $c)"`
|
tombpass=`exec_as_user ${TOMBEXEC} askpass "$keyname (retry $c)"`
|
||||||
fi
|
fi
|
||||||
print "${tombpass}" \
|
(gpg --batch --passphrase-fd 0 --no-tty --no-options \
|
||||||
| gpg --batch --passphrase-fd 0 --no-tty --no-options \
|
-d "${tombkey}" 2> /dev/null <<< ${tombpass} ) \
|
||||||
-d "${tombkey}" 2> /dev/null \
|
| cryptsetup --key-file - luksOpen ${nstloop} ${mapper}
|
||||||
| cryptsetup --key-file - luksOpen ${nstloop} ${mapper}
|
|
||||||
|
|
||||||
unset tombpass
|
unset tombpass
|
||||||
|
|
||||||
# if key was from stdin delete temp file and dir
|
# if key was from stdin delete temp file and dir
|
||||||
|
Loading…
Reference in New Issue
Block a user