From fa57768485233868aebbea16bf358c1f043f2942 Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 9 Jan 2004 23:30:05 +0000 Subject: Quote the SpamAssassin arguments before passing them to sh as to avoid problems with BSD's Bourne shell. Submitted by: Khairil Yusof git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@1610 df743ca5-7f9a-e211-a948-0013205c9059 --- mail/evolution/Makefile | 1 + mail/evolution/files/patch-mail_em-junk-filter.c | 81 ++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 mail/evolution/files/patch-mail_em-junk-filter.c (limited to 'mail') 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");) -- cgit v1.2.3