diff options
author | roam <roam@FreeBSD.org> | 2005-07-01 16:43:25 +0000 |
---|---|---|
committer | roam <roam@FreeBSD.org> | 2005-07-01 16:43:25 +0000 |
commit | d64e8b51779299e925e1ca42619281acdb7c54f0 (patch) | |
tree | 470c0e59f1e723c8f05eed360e653b69db065a6c /mail/vpopmail | |
parent | 19281d378258c86e36f9b04af03c0cd1a6a52ab8 (diff) | |
download | FreeBSD-ports-d64e8b51779299e925e1ca42619281acdb7c54f0.zip FreeBSD-ports-d64e8b51779299e925e1ca42619281acdb7c54f0.tar.gz |
Set the SHELL environment variable to "/bin/sh" in vdelivermail before
executing external programs.
PR: 69969
Submitted by: Claudiu Bosioc <claudiu@casi.ro>
Diffstat (limited to 'mail/vpopmail')
-rw-r--r-- | mail/vpopmail/Makefile | 2 | ||||
-rw-r--r-- | mail/vpopmail/files/patch-vdelivermail.c | 28 |
2 files changed, 19 insertions, 11 deletions
diff --git a/mail/vpopmail/Makefile b/mail/vpopmail/Makefile index 0e2b2ac..31c4956 100644 --- a/mail/vpopmail/Makefile +++ b/mail/vpopmail/Makefile @@ -7,7 +7,7 @@ PORTNAME= vpopmail PORTVERSION= 5.4.10 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/mail/vpopmail/files/patch-vdelivermail.c b/mail/vpopmail/files/patch-vdelivermail.c index fd897a6..c63ef92 100644 --- a/mail/vpopmail/files/patch-vdelivermail.c +++ b/mail/vpopmail/files/patch-vdelivermail.c @@ -1,5 +1,5 @@ ---- vdelivermail.c.orig Mon Oct 20 20:59:57 2003 -+++ vdelivermail.c Sat Nov 1 11:21:15 2003 +--- vdelivermail.c.orig Thu May 27 03:31:09 2004 ++++ vdelivermail.c Fri Jul 1 19:20:25 2005 @@ -62,6 +62,7 @@ #define FILE_SIZE 156 char hostname[FILE_SIZE]; @@ -8,7 +8,7 @@ #define MSG_BUF_SIZE 5000 char msgbuf[MSG_BUF_SIZE]; -@@ -90,6 +91,10 @@ +@@ -89,6 +90,10 @@ void usernotfound(void); int is_loop_match( char *dt, char *address); int deliver_quota_warning(const char *dir, const char *q); @@ -19,7 +19,7 @@ static char local_file[156]; static char local_file_new[156]; -@@ -257,7 +262,7 @@ +@@ -256,7 +261,7 @@ /* check for wildcard if there's no match */ if(tmpstr == NULL) { @@ -29,13 +29,13 @@ tmpuser[0] = '\0'; strncat(tmpuser,TheUser,i); @@ -444,6 +449,7 @@ - int inject = 0; + int write_fd; FILE *fs; char tmp_file[256]; + int pim[2]; - /* check if the email is looping to this user */ - if ( is_looping( address ) == 1 ) { + /* This is a comment, ignore it */ + if ( *address == '#' ) return(0); @@ -631,6 +637,51 @@ } } @@ -88,7 +88,15 @@ /* read it in chunks and write it to the new file */ while((file_count=read(0,msgbuf,MSG_BUF_SIZE))>0) { -@@ -881,6 +932,9 @@ +@@ -823,6 +874,7 @@ + printf("unable to fork\n"); + exit(0); + case 0: ++ setenv("SHELL", "/bin/sh", 1); + args[0] = "/bin/sh"; args[1] = "-c"; args[2] = prog; args[3] = 0; + sig_catch(SIGPIPE,SIG_DFL); + execv(*args,args); +@@ -882,6 +934,9 @@ if (strncmp(loop_buf, "Delivered-To: ", 14) == 0 && is_loop_match(loop_buf, address)==1 ) { @@ -98,7 +106,7 @@ /* return the loop found */ return(1); -@@ -919,6 +973,8 @@ +@@ -920,6 +975,8 @@ * looping not found value */ if ( found == 0 ) { @@ -107,7 +115,7 @@ /* return not found looping message value */ return(0); } -@@ -1335,3 +1391,96 @@ +@@ -1300,3 +1357,96 @@ return(1); } |