summaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2004-01-10 07:30:05 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2004-01-10 07:30:05 +0800
commitfa57768485233868aebbea16bf358c1f043f2942 (patch)
tree8b95529262c15703253d7d9a6d55496aeef2cee6 /mail
parentc3d6fbf39b9018add940642b6fe267c81d14a0f0 (diff)
downloadmarcuscom-ports-fa57768485233868aebbea16bf358c1f043f2942.tar
marcuscom-ports-fa57768485233868aebbea16bf358c1f043f2942.tar.gz
marcuscom-ports-fa57768485233868aebbea16bf358c1f043f2942.tar.bz2
marcuscom-ports-fa57768485233868aebbea16bf358c1f043f2942.tar.lz
marcuscom-ports-fa57768485233868aebbea16bf358c1f043f2942.tar.xz
marcuscom-ports-fa57768485233868aebbea16bf358c1f043f2942.tar.zst
marcuscom-ports-fa57768485233868aebbea16bf358c1f043f2942.zip
Quote the SpamAssassin arguments before passing them to sh as to
avoid problems with BSD's Bourne shell. Submitted by: Khairil Yusof <kaeru@pd.jaring.my> git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@1610 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'mail')
-rw-r--r--mail/evolution/Makefile1
-rw-r--r--mail/evolution/files/patch-mail_em-junk-filter.c81
2 files changed, 82 insertions, 0 deletions
diff --git a/mail/evolution/Makefile b/mail/evolution/Makefile
index a1fde4293..b0b38bcc1 100644
--- a/mail/evolution/Makefile
+++ b/mail/evolution/Makefile
@@ -7,6 +7,7 @@
PORTNAME= evolution
PORTVERSION= 1.5.1
+PORTREVISION= 1
CATEGORIES= mail gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME}/1.5
diff --git a/mail/evolution/files/patch-mail_em-junk-filter.c b/mail/evolution/files/patch-mail_em-junk-filter.c
new file mode 100644
index 000000000..cb2936a8a
--- /dev/null
+++ b/mail/evolution/files/patch-mail_em-junk-filter.c
@@ -0,0 +1,81 @@
+--- mail/em-junk-filter.c.orig Thu Nov 13 19:33:26 2003
++++ mail/em-junk-filter.c Fri Jan 9 15:49:44 2004
+@@ -189,7 +189,7 @@
+ static gchar *args [3] = {
+ "/bin/sh",
+ "-c",
+- "spamassassin --version"
++ "'spamassassin --version'" /* quoted command string */
+ };
+
+ if (pipe_to_sa (NULL, NULL, 3, args))
+@@ -225,7 +225,7 @@
+ for (i = 0; i < NPORTS; i ++) {
+ d(fprintf (stderr, "trying to run spamd at port %d\n", port));
+
+- sad_args [2] = g_strdup_printf ("spamd --port %d --local --daemonize", port);
++ sad_args [2] = g_strdup_printf ("'spamd --port %d --local --daemonize'", port); /* quote command string */
+ if (!pipe_to_sa (NULL, NULL, 3, sad_args)) {
+ g_free (sad_args [2]);
+ em_junk_sa_use_spamc = TRUE;
+@@ -274,15 +274,17 @@
+ ? (em_junk_sa_spamd_port == -1
+ ? g_strdup ("spamc -c") /* Exit with a non-zero exit code if the
+ tested message was junk */
+- : g_strdup_printf ("spamc"
++ : g_strdup_printf ("'"
++ "spamc"
+ " -c" /* Exit with a non-zero exit code if the
+ tested message was junk */
+ " -p %d", em_junk_sa_spamd_port))
+ : g_strdup ("spamassassin"
+ " --exit-code" /* Exit with a non-zero exit code if the
+ tested message was junk */
+- " --local"); /* Local tests only (no online tests) */
+-
++ " --local" /* Local tests only (no online tests) */
++ "'"
++ );
+ retval = pipe_to_sa (msg, NULL, 3, args);
+
+ g_free (args [2]);
+@@ -296,11 +298,13 @@
+ static gchar *args [3] = {
+ "/bin/sh",
+ "-c",
++ "'" /* begin quote */
+ "sa-learn"
+ " --no-rebuild" /* do not rebuild db */
+ " --spam" /* report junk */
+ " --single" /* single message */
+ " --local" /* local only */
++ "'" /* end quote */
+ };
+
+ d(fprintf (stderr, "em_junk_sa_report_junk\n"));
+@@ -315,11 +319,13 @@
+ static gchar *args [3] = {
+ "/bin/sh",
+ "-c",
++ "'" /* begin quote */
+ "sa-learn"
+ " --no-rebuild" /* do not rebuild db */
+ " --ham" /* report notjunk */
+ " --single" /* single message */
+ " --local" /* local only */
++ "'" /* end quote */
+ };
+
+ d(fprintf (stderr, "em_junk_sa_report_notjunk\n"));
+@@ -334,9 +340,11 @@
+ static gchar *args [3] = {
+ "/bin/sh",
+ "-c",
++ "'" /* begin quote */
+ "sa-learn"
+ " --rebuild" /* do not rebuild db */
+ " --local" /* local only */
++ "'" /* end quote */
+ };
+
+ d(fprintf (stderr, "em_junk_sa_commit_reports\n");)