From e2ba133e3d3e557b0605c261be0dfaf9aa2e9ee6 Mon Sep 17 00:00:00 2001 From: Jan Lentfer Date: Mon, 25 Jan 2010 19:35:05 +0100 Subject: [PATCH] sendmail: Update master to work with v8.14.4 * Removed some now obsolete patches * Made remaining patches apply cleanly --- usr.sbin/sendmail/Makefile | 2 +- usr.sbin/sendmail/mci.c.patch | 47 ------------------------------ usr.sbin/sendmail/srvrsmtp.c.patch | 20 ++++--------- 3 files changed, 6 insertions(+), 63 deletions(-) delete mode 100644 usr.sbin/sendmail/mci.c.patch diff --git a/usr.sbin/sendmail/Makefile b/usr.sbin/sendmail/Makefile index 1a686ac90a..dfcc1abe1c 100644 --- a/usr.sbin/sendmail/Makefile +++ b/usr.sbin/sendmail/Makefile @@ -7,7 +7,7 @@ SMDIR= ${SENDMAIL_DIR}/sendmail .PATH: ${SMDIR} CONTRIBDIR= ${SMDIR} -PATCHES= mci.c.patch main.c.patch srvrsmtp.c.patch +PATCHES= main.c.patch srvrsmtp.c.patch BINDIR= /usr/libexec/sendmail diff --git a/usr.sbin/sendmail/mci.c.patch b/usr.sbin/sendmail/mci.c.patch deleted file mode 100644 index 42a69b2bcb..0000000000 --- a/usr.sbin/sendmail/mci.c.patch +++ /dev/null @@ -1,47 +0,0 @@ -$DragonFly: src/usr.sbin/sendmail/mci.c.patch,v 1.4 2007/04/14 17:43:48 gshapiro Exp $ - -Index: mci.c -=================================================================== -RCS file: /home/joerg/wd/repository/dragonflybsd/src/contrib/sendmail-8.13.6/sendmail/mci.c,v -retrieving revision 1.1.1.1 -diff -u -r1.1.1.1 mci.c ---- mci.c 6 Jun 2005 04:25:22 -0000 1.1.1.1 -+++ mci.c 23 Aug 2005 15:04:54 -0000 -@@ -1131,7 +1131,7 @@ - size_t len; - char *newptr; - struct dirent *e; -- char newpath[MAXPATHLEN]; -+ char newpath[PATH_MAX]; - #if MAXPATHLEN <= MAXNAMLEN - 3 - ERROR "MAXPATHLEN <= MAXNAMLEN - 3" - #endif /* MAXPATHLEN <= MAXNAMLEN - 3 */ -@@ -1143,7 +1143,7 @@ - pathname, sm_errstring(errno)); - return -1; - } -- len = sizeof(newpath) - MAXNAMLEN - 3; -+ len = sizeof(newpath) - 2; /* enough space for '/' and NUL */ - if (sm_strlcpy(newpath, pathname, len) >= len) - { - if (tTd(56, 2)) -@@ -1153,6 +1153,7 @@ - } - newptr = newpath + strlen(newpath); - *newptr++ = '/'; -+ len = sizeof(newpath) - (newptr - newpath); - - /* - ** repeat until no file has been removed -@@ -1169,9 +1170,8 @@ - if (e->d_name[0] == '.') - continue; - -- (void) sm_strlcpy(newptr, e->d_name, -- sizeof(newpath) - -- (newptr - newpath)); -+ if (sm_strlcpy(newptr, e->d_name, len) >= len) -+ continue; - - if (StopRequest) - stop_sendmail(); diff --git a/usr.sbin/sendmail/srvrsmtp.c.patch b/usr.sbin/sendmail/srvrsmtp.c.patch index 9d885185b6..a482f502dc 100644 --- a/usr.sbin/sendmail/srvrsmtp.c.patch +++ b/usr.sbin/sendmail/srvrsmtp.c.patch @@ -16,10 +16,10 @@ diff -u -p -r1.1.1.2 srvrsmtp.c /* abort milter filters */ \ MILTER_ABORT(e); \ \ -@@ -487,8 +489,9 @@ /* clean up a bit */ \ +@@ -490,8 +489,9 @@ /* clean up a bit */ \ smtp.sm_gotmail = false; \ SuprErrs = true; \ - dropenvelope(e, true, false); \ + (void) dropenvelope(e, true, false); \ - sm_rpool_free(e->e_rpool); \ + orpool = e->e_rpool; \ e = newenvelope(e, CurEnv, sm_rpool_new_x(NULL)); \ @@ -27,7 +27,7 @@ diff -u -p -r1.1.1.2 srvrsmtp.c CurEnv = e; \ e->e_features = features; \ \ -@@ -3285,6 +3288,7 @@ char *id; +@@ -3345,6 +3288,7 @@ char *id; char *oldid; unsigned int features; char buf[32]; @@ -35,21 +35,11 @@ diff -u -p -r1.1.1.2 srvrsmtp.c SmtpPhase = "server DATA"; if (!smtp->sm_gotmail) -@@ -3775,18 +3779,12 @@ if (WILL_BE_QUEUED(ee->e_sendmode)) - dropenvelope(ee, true, false); - } - } -- sm_rpool_free(e->e_rpool); -- -- /* -- ** At this point, e == &MainEnvelope, but if we did splitting, -- ** then CurEnv may point to an envelope structure that was just -- ** freed with the rpool. So reset CurEnv *before* calling -- ** newenvelope. -- */ +@@ -3863,8 +3863,9 @@ CurEnv = e; features = e->e_features; +- sm_rpool_free(e->e_rpool); + orpool = e->e_rpool; newenvelope(e, e, sm_rpool_new_x(NULL)); + sm_rpool_free(orpool); -- 2.41.0