sendmail: Update master to work with v8.14.4
authorJan Lentfer <Jan.Lentfer@web.de>
Mon, 25 Jan 2010 18:35:05 +0000 (19:35 +0100)
committerJan Lentfer <Jan.Lentfer@web.de>
Mon, 25 Jan 2010 18:35:05 +0000 (19:35 +0100)
* Removed some now obsolete patches
* Made remaining patches apply cleanly

usr.sbin/sendmail/Makefile
usr.sbin/sendmail/mci.c.patch [deleted file]
usr.sbin/sendmail/srvrsmtp.c.patch

index 1a686ac..dfcc1ab 100644 (file)
@@ -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 (file)
index 42a69b2..0000000
+++ /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();
index 9d88518..a482f50 100644 (file)
@@ -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);