aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-09-18 13:34:34 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-09-18 13:34:34 -0300
commit43235df8406f6e8e400de502d36b9fa46de12756 (patch)
treebacc677d4a6e30929068643edd2919dd40b8bfa1
parentaccf65eda77b9a6c6edffcca825ddbc32e3cc63b (diff)
downloadkeyringer-43235df8406f6e8e400de502d36b9fa46de12756.tar.gz
keyringer-43235df8406f6e8e400de502d36b9fa46de12756.tar.bz2
Comments
-rw-r--r--lib/keyringer/functions1
-rwxr-xr-xshare/keyringer/edit2
-rwxr-xr-xshare/keyringer/genpair4
3 files changed, 7 insertions, 0 deletions
diff --git a/lib/keyringer/functions b/lib/keyringer/functions
index 630f519..a2a35be 100644
--- a/lib/keyringer/functions
+++ b/lib/keyringer/functions
@@ -24,6 +24,7 @@ function keyringer_config_load {
keyringer_config_load_preferences
}
+# Load config preferences
function keyringer_config_load_preferences {
# Load custom keyring preferences
if [ ! -z "$PREFERENCES" ] && [ -f "$PREFERENCES" ]; then
diff --git a/share/keyringer/edit b/share/keyringer/edit
index bee1d7b..edeb693 100755
--- a/share/keyringer/edit
+++ b/share/keyringer/edit
@@ -11,6 +11,7 @@ keyringer_set_env $*
# Get file
keyringer_get_file $2
+# Warn user
echo "Make sure that $BASEDIR is atop of an encrypted volume."
# Set a tmp file
@@ -20,6 +21,7 @@ trap "keyringer_unset_tmpfile $TMPFILE ; exit" INT TERM EXIT
# Decrypt the information to the file
gpg --yes -o $TMPFILE --use-agent -d $KEYDIR/$FILE
+# Prompt
echo "Press any key to open the decrypted data into $EDITOR, Ctrl-C to abort"
read key
$EDITOR $TMPFILE
diff --git a/share/keyringer/genpair b/share/keyringer/genpair
index 6de4b4e..cc54ba8 100755
--- a/share/keyringer/genpair
+++ b/share/keyringer/genpair
@@ -138,6 +138,10 @@ fi
# Prepare
mkdir -p $KEYDIR && chmod 700 $KEYDIR
+
+WORK="`keyringer_set_tmpfile genpair`"
+trap "keyringer_unset_tmpfile $WORK; exit" INT TERM EXIT
+
WORK="`mktemp -d $KEYDIR/genpair.XXXXXX`"
if [ "$?" != "0" ]; then
echo "Error setting up $WORK"