summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"