summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-11-26 23:23:52 +0100
committerMichał Górny <mgorny@gentoo.org>2017-11-26 23:23:52 +0100
commit5f32b1e43c3a3bbaa7f09441268d4f2217b0ca23 (patch)
tree985ee5521d800e3ff2e1e8769f497e3f4ed82ccf
parent00d1cd32201078dc69e3b00bd9759a0b2998cb57 (diff)
downloadgemato-5f32b1e43c3a3bbaa7f09441268d4f2217b0ca23.tar.gz
openpgp: Use GNUPGHOME for better process isolation
Override GNUPGHOME rather than HOME to isolated GnuPG operations. While the latter seemed to work fine for isolating the keys, the former guarantees better isolation, to the point of spawning a separate agent.
-rw-r--r--gemato/openpgp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gemato/openpgp.py b/gemato/openpgp.py
index 83044b6..951ab79 100644
--- a/gemato/openpgp.py
+++ b/gemato/openpgp.py
@@ -14,7 +14,7 @@ import gemato.exceptions
def _spawn_gpg(options, home, stdin):
env = None
if home is not None:
- env={'HOME': home}
+ env={'GNUPGHOME': home}
try:
p = subprocess.Popen(['gpg', '--batch'] + options,