aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-config.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index b8f82bb6d3..f407aa6629 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,12 @@
2005-02-22 Not Zed <NotZed@Ximian.com>
+ ** See bug #40515
+
+ * mail-config.c (mail_config_signature_run_script): run the script
+ using /bin/sh -c, so arguments may be passed to the script.
+
+2005-02-22 Not Zed <NotZed@Ximian.com>
+
** See bug #68866
* em-format-quote.c (emfq_format_headers): line-feed after all
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 0d0943b254..a3c2d6819e 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -978,7 +978,7 @@ mail_config_signature_run_script (const char *script)
int result, status;
int in_fds[2];
pid_t pid;
-
+
if (pipe (in_fds) == -1) {
g_warning ("Failed to create pipe to '%s': %s", script, g_strerror (errno));
return NULL;
@@ -1001,7 +1001,7 @@ mail_config_signature_run_script (const char *script)
fcntl (i, F_SETFD, FD_CLOEXEC);
}
- execlp (script, script, NULL);
+ execlp("/bin/sh", "/bin/sh", "-c", script, NULL);
g_warning ("Could not execute %s: %s\n", script, g_strerror (errno));
_exit (255);
} else if (pid < 0) {