summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
Diffstat (limited to 'methods')
-rw-r--r--methods/gpgv.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/methods/gpgv.cc b/methods/gpgv.cc
index 9f2ccb174..947b585da 100644
--- a/methods/gpgv.cc
+++ b/methods/gpgv.cc
@@ -190,6 +190,12 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
if (Debug == true)
std::clog << "inside VerifyGetSigners" << std::endl;
+ // Abort early if we can't find gpgv, before forking further. This also
+ // caches the invocation of --dump-options to find the working gpgv across
+ // our fork() below.
+ if (APT::Internal::FindGPGV(Debug).first.empty())
+ return "Internal error: Cannot find gpgv";
+
int fd[2];
if (pipe(fd) < 0)