summaryrefslogtreecommitdiff
path: root/mail/courier-mta/patches/patch-ah
blob: 042dec940355790f1c8d2cb9a9e283f0349bdd17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$NetBSD: patch-ah,v 1.3 2010/06/15 23:01:23 pettai Exp $

--- courier/module.local/deliver.c.orig	2006-05-28 11:29:52.000000000 -0400
+++ courier/module.local/deliver.c
@@ -649,7 +649,7 @@ static int docommand(const char *extensi
 		const char *defaultmail,
 		int recursion_level)
 {
-char	*envs[19];
+char	*envs[20];
 const char *p;
 const char *hostp;
 pid_t	pid;
@@ -741,7 +741,9 @@ const char *shell=getenv("SHELL");
 	envs[17]=courier_malloc(strlen(shell)
 				+sizeof("SHELL="));
 	strcat(strcpy(envs[17], "SHELL="), shell);
-	envs[18]=0;
+	envs[18]=courier_malloc(sizeof("COURIER_MTA="));
+	strcpy(envs[18], "COURIER_MTA=");
+	envs[19]=0;
 
 	if (*command == '|')
 	{