tFIX #36 pinentry and password with spaces - tomb - the crypto undertaker
HTML git clone git://parazyd.org/tomb.git
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit f0cd7f50a273837f2cdb120c26d722ff7b539ea8
DIR parent ab7beebfc9d728befd8739a175e832486a95a791
HTML Author: boyska <piuttosto@logorroici.org>
Date: Tue, 30 Aug 2011 00:40:04 +0200
FIX #36 pinentry and password with spaces
Diffstat:
M src/tomb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
DIR diff --git a/src/tomb b/src/tomb
t@@ -154,7 +154,7 @@ ask_password() {
GTK2_RC=/usr/share/themes/tomb/gtk-2.0-key/gtkrc
fi
- cat <<EOF | GTK2_RC_FILES=${GTK2_RC} pinentry 2>/dev/null | awk '/^D/ { print $2 }'
+ cat <<EOF | GTK2_RC_FILES=${GTK2_RC} pinentry 2>/dev/null | awk '/^D / { sub(/^D /, ""); print }'
OPTION ttyname=$TTY
OPTION lc-ctype=$LANG
SETTITLE Insert tomb password
t@@ -186,7 +186,7 @@ check_priv() {
sudok=false
sudo -n ${TOMBEXEC} &> /dev/null
if [ $? != 0 ]; then # if not then ask a password
- cat <<EOF | pinentry 2>/dev/null | awk '/^D/ { print $2 }' | sudo -S -v
+ cat <<EOF | pinentry 2>/dev/null | awk '/^D / { sub(/^D /, ""); print }' | sudo -S -v
OPTION ttyname=$TTY
OPTION lc-ctype=$LANG
SETTITLE Super user privileges required