From 990c334442c6c8cb5a7a6c0b4d11c0a8d3adac6d Mon Sep 17 00:00:00 2001
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Date: Thu, 4 Sep 2008 20:14:31 -0400
Subject: [PATCH] switch from execv to execvp to find base64 wherever it is in
 the path.

---
 src/keytrans/gnutls-helpers.c | 2 +-
 src/keytrans/openpgp2ssh.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/keytrans/gnutls-helpers.c b/src/keytrans/gnutls-helpers.c
index 7c4348d..8d8ec17 100644
--- a/src/keytrans/gnutls-helpers.c
+++ b/src/keytrans/gnutls-helpers.c
@@ -387,7 +387,7 @@ int create_writing_pipe(pid_t* pid, const char* path, char* const argv[]) {
       err(0,"Failed to transfer reading file descriptor to stdin (error: %d \"%s\")\n", errno, strerror(errno));
       exit(1);
     }
-    execv(path, argv);
+    execvp(path, argv);
     err(0,"exec %s failed (error: %d \"%s\")\n", path, errno, strerror(errno));
     /* close the open file descriptors */
     close(p[0]);
diff --git a/src/keytrans/openpgp2ssh.c b/src/keytrans/openpgp2ssh.c
index 36fb30a..427adc8 100644
--- a/src/keytrans/openpgp2ssh.c
+++ b/src/keytrans/openpgp2ssh.c
@@ -208,7 +208,7 @@ int emit_public_openssh_from_pgp(const gnutls_openpgp_crt_t* pgp_crt, const unsi
   /* variables for the output conversion: */
   int pipestatus;
   int pipefd, child_pid;
-  char* const b64args[] = {"/usr/bin/base64", "--wrap=0", NULL};
+  char* const b64args[] = {"base64", "--wrap=0", NULL};
 
   init_datum(&m);
   init_datum(&e);
-- 
2.34.1