summaryrefslogtreecommitdiff
path: root/src/share/common
diff options
context:
space:
mode:
authorJameson Rollins <jrollins@finestructure.net>2010-01-15 18:34:01 -0500
committerJameson Rollins <jrollins@finestructure.net>2010-01-15 18:34:01 -0500
commit1e207b9914d4b19450c94a3de4dbf41305638035 (patch)
treeff993506ac5c917ae0c0c639aac69277a5b5244b /src/share/common
parentb8daaa5b9ae8a5938e05cc33ba3153c13fce1bf9 (diff)
add trap to remove temp dir in list_primary_fingerprints function
Diffstat (limited to 'src/share/common')
-rw-r--r--src/share/common2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/share/common b/src/share/common
index 7bacd4e..914fffa 100644
--- a/src/share/common
+++ b/src/share/common
@@ -1177,9 +1177,11 @@ process_authorized_user_ids() {
# fingerprints, one per line:
list_primary_fingerprints() {
local fake=$(msmktempdir)
+ trap "rm -rf $fake" EXIT
GNUPGHOME="$fake" gpg --no-tty --quiet --import
GNUPGHOME="$fake" gpg --with-colons --fingerprint --list-keys | \
awk -F: '/^fpr:/{ print $10 }'
+ trap - EXIT
rm -rf "$fake"
}