[Commits] [SCM] claws branch, master, updated. 3.13.2-163-gfd6e308

claws at claws-mail.org claws at claws-mail.org
Mon Jul 4 10:25:51 CEST 2016


The branch, master has been updated
       via  fd6e3082a806cf87c6660b98131e3ee3eab58a75 (commit)
      from  6295af1f9553d53f6e96b79b444b3d52ea72ae3b (commit)

Summary of changes:
 src/plugins/pgpcore/pgp_viewer.c |   19 +------------------
 src/plugins/pgpcore/sgpgme.c     |   21 ++++++++++++++++++++-
 src/plugins/pgpcore/sgpgme.h     |    1 +
 3 files changed, 22 insertions(+), 19 deletions(-)


- Log -----------------------------------------------------------------
commit fd6e3082a806cf87c6660b98131e3ee3eab58a75
Author: Paul <paul at claws-mail.org>
Date:   Mon Jul 4 09:25:46 2016 +0100

    modify 61f7c3c5e to catch another hardcoded gpg call

diff --git a/src/plugins/pgpcore/pgp_viewer.c b/src/plugins/pgpcore/pgp_viewer.c
index 22e9cae..f4256fb 100644
--- a/src/plugins/pgpcore/pgp_viewer.c
+++ b/src/plugins/pgpcore/pgp_viewer.c
@@ -70,23 +70,6 @@ static GtkWidget *pgp_get_widget(MimeViewer *_viewer)
 	return GTK_WIDGET(viewer->textview->vbox);
 }
 
-static gchar *_get_gpg_executable_name()
-{
-	gpgme_engine_info_t e;
-
-	if (!gpgme_get_engine_info(&e)) {
-		while (e != NULL) {
-			if (e->protocol == GPGME_PROTOCOL_OpenPGP
-					&& e->file_name != NULL) {
-				debug_print("Found gpg executable: '%s'\n", e->file_name);
-				return e->file_name;
-			}
-		}
-	}
-
-	return NULL;
-}
-
 #ifdef G_OS_WIN32
 struct _ImportCtx {
 	gboolean done;
@@ -182,7 +165,7 @@ static void pgpview_show_mime_part(TextView *textview, MimeInfo *partinfo)
 	}
 	gpgme_get_key(ctx, sig->fpr, &key, 0);
 	if (!key) {
-		gchar *gpgbin = _get_gpg_executable_name();
+		gchar *gpgbin = get_gpg_executable_name();
 		gchar *cmd = g_strdup_printf("\"%s\" --no-tty --recv-keys %s",
 				(gpgbin ? gpgbin : "gpg"), sig->fpr);
 		AlertValue val = G_ALERTDEFAULT;
diff --git a/src/plugins/pgpcore/sgpgme.c b/src/plugins/pgpcore/sgpgme.c
index d407531..093d262 100644
--- a/src/plugins/pgpcore/sgpgme.c
+++ b/src/plugins/pgpcore/sgpgme.c
@@ -168,6 +168,23 @@ static const gchar *get_owner_trust_str(unsigned long owner_trust)
 	}
 }
 
+gchar *get_gpg_executable_name()
+{
+	gpgme_engine_info_t e;
+
+	if (!gpgme_get_engine_info(&e)) {
+		while (e != NULL) {
+			if (e->protocol == GPGME_PROTOCOL_OpenPGP
+					&& e->file_name != NULL) {
+				debug_print("Found gpg executable: '%s'\n", e->file_name);
+				return e->file_name;
+			}
+		}
+	}
+
+	return NULL;
+}
+
 static gchar *extract_name(const char *uid)
 {
 	if (uid == NULL)
@@ -889,7 +906,9 @@ again:
 		g_free(buf);
 		if (val == G_ALERTALTERNATE) {
 #ifndef G_OS_WIN32
-			gchar *cmd = g_strdup_printf("gpg --no-tty --send-keys %s", key->fpr);
+			gchar *gpgbin = get_gpg_executable_name();
+			gchar *cmd = g_strdup_printf("\"%s\" --no-tty --send-keys %s",
+				(gpgbin ? gpgbin : "gpg"), key->fpr);
 			int res = 0;
 			pid_t pid = 0;
 			pid = fork();
diff --git a/src/plugins/pgpcore/sgpgme.h b/src/plugins/pgpcore/sgpgme.h
index c61da59..78127f4 100644
--- a/src/plugins/pgpcore/sgpgme.h
+++ b/src/plugins/pgpcore/sgpgme.h
@@ -52,5 +52,6 @@ void sgpgme_create_secret_key(PrefsAccount *account, gboolean ask_create);
 void *sgpgme_data_release_and_get_mem(gpgme_data_t data, size_t *len);
 
 gpgme_error_t cm_gpgme_data_rewind(gpgme_data_t dh);
+gchar *get_gpg_executable_name();
 
 #endif /* SGPGME_H */

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list