summaryrefslogtreecommitdiff
path: root/src/share/mh/add_revoker
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/mh/add_revoker')
-rw-r--r--src/share/mh/add_revoker17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/share/mh/add_revoker b/src/share/mh/add_revoker
index 239dcfc..428b958 100644
--- a/src/share/mh/add_revoker
+++ b/src/share/mh/add_revoker
@@ -61,24 +61,23 @@ if [ -f "$keyID" -o "$keyID" = '-' ] ; then
# else, get the key from the keyserver
else
- # create a temporary directory for storing the downloaded key
- local GNUPGHOME="$tmpDir"
- chmod 0700 "$GNUPGHOME"
- chown "$MONKEYSPHERE_USER":"$MONKEYSPHERE_USER" "$GNUPGHOME"
- export GNUPGHOME
+ # fix permissions and ownership on temporary directory which will
+ # be used by monkeysphere user for storing the downloaded key
+ chmod 0700 "$tmpDir"
+ chown "$MONKEYSPHERE_USER":"$MONKEYSPHERE_USER" "$tmpDir"
# download the key from the keyserver as the monkeysphere user
log verbose "searching keyserver $KEYSERVER for keyID $keyID..."
- su_monkeysphere_user "gpg --quiet --keyserver $KEYSERVER --recv-key 0x${keyID}!" \
+ su_monkeysphere_user "GNUPGHOME=$tmpDir gpg --quiet --keyserver $KEYSERVER --recv-key 0x${keyID}!" \
|| failure "Could not receive a key with this ID from the '$KEYSERVER' keyserver."
# get the full fingerprint of new revoker key
log debug "getting fingerprint of revoker key..."
- fingerprint=$(su_monkeysphere_user "gpg --list-key --with-colons --with-fingerprint 0x${keyID}!" \
+ fingerprint=$(su_monkeysphere_user "GNUPGHOME=$tmpDir gpg --list-key --with-colons --with-fingerprint 0x${keyID}!" \
| grep '^fpr:' | grep "$keyID" | cut -d: -f10)
log info "key found:"
- su_monkeysphere_user "gpg --fingerprint 0x${fingerprint}!"
+ su_monkeysphere_user "GNUPGHOME=$tmpDir gpg --fingerprint 0x${fingerprint}!"
if [ "$PROMPT" = "true" ] ; then
echo "Are you sure you want to add the above key as a"
@@ -92,7 +91,7 @@ else
# export the new key to the host keyring
log debug "loading key into host keyring..."
- su_monkeysphere_user "gpg --quiet --export 0x${fingerprint}!" \
+ su_monkeysphere_user "GNUPGHOME=$tmpDir gpg --quiet --export 0x${fingerprint}!" \
| gpg_host --import
fi
ef='/notmuch/diff/tags/ec/3b/B6CE805A-DB1B-4AE0-BFB7-FEC50FADC521@kaospilot.dk/unread?h=master'>tags/ec/3b/B6CE805A-DB1B-4AE0-BFB7-FEC50FADC521@kaospilot.dk/unread0
-rw-r--r--tags/ec/3b/CAPZ_h9mH8VVTOOPVyA+ZU44AHWL1sz0m2LnyHJ8rsQyS7ZcRCw@mail.gmail.com/debian0
-rw-r--r--tags/ec/3b/l03130307b5aaea0b4466@%5b192.168.1.103%5d/inbox0
-rw-r--r--tags/ec/3b/l03130307b5aaea0b4466@%5b192.168.1.103%5d/old0
-rw-r--r--tags/ec/3b/mailman.98.1588921202.30193.pkg-multimedia-maintainers@alioth-lists.debian.net/inbox0
-rw-r--r--tags/ec/3b/mailman.98.1588921202.30193.pkg-multimedia-maintainers@alioth-lists.debian.net/killed0
-rw-r--r--tags/ec/3b/mailman.98.1588921202.30193.pkg-multimedia-maintainers@alioth-lists.debian.net/unread0
20 files changed, 0 insertions, 0 deletions