Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/gnu/dist/sendmail Pull up revision 1.6 (requested by it...



details:   https://anonhg.NetBSD.org/src/rev/f137a11141e4
branches:  netbsd-1-5
changeset: 492789:f137a11141e4
user:      he <he%NetBSD.org@localhost>
date:      Wed Feb 20 23:12:09 2002 +0000

description:
Pull up revision 1.6 (requested by itojun):
  Upgrade to sendmail version 8.11.6.

diffstat:

 gnu/dist/sendmail/cf/m4/cfhead.m4             |   3 +-
 gnu/dist/sendmail/include/sendmail/sendmail.h |   3 +-
 gnu/dist/sendmail/mailstats/mailstats.c       |   6 ++--
 gnu/dist/sendmail/praliases/praliases.c       |  16 +++++++++---
 gnu/dist/sendmail/sendmail/alias.c            |  19 ++++++++------
 gnu/dist/sendmail/sendmail/bf_torek.c         |  34 ++++++++++++++------------
 gnu/dist/sendmail/sendmail/envelope.c         |  16 ++++++------
 gnu/dist/sendmail/sendmail/mailq.0            |  15 +----------
 gnu/dist/sendmail/sendmail/stab.c             |   8 +++---
 9 files changed, 60 insertions(+), 60 deletions(-)

diffs (truncated from 407 to 300 lines):

diff -r b72cee74944e -r f137a11141e4 gnu/dist/sendmail/cf/m4/cfhead.m4
--- a/gnu/dist/sendmail/cf/m4/cfhead.m4 Wed Feb 20 23:12:05 2002 +0000
+++ b/gnu/dist/sendmail/cf/m4/cfhead.m4 Wed Feb 20 23:12:09 2002 +0000
@@ -223,7 +223,6 @@
        _REC_TLS_
        _REC_END_')
 define(`confSEVEN_BIT_INPUT', `False')
-define(`confEIGHT_BIT_HANDLING', `pass8')
 define(`confALIAS_WAIT', `10')
 define(`confMIN_FREE_BLOCKS', `100')
 define(`confBLANK_SUB', `.')
@@ -252,4 +251,4 @@
 
 
 divert(0)dnl
-VERSIONID(`Id: cfhead.m4,v 8.76.4.15 2001/02/14 04:07:20 gshapiro Exp')
+VERSIONID(`Id: cfhead.m4,v 8.76.4.16 2001/03/06 22:56:36 ca Exp')
diff -r b72cee74944e -r f137a11141e4 gnu/dist/sendmail/include/sendmail/sendmail.h
--- a/gnu/dist/sendmail/include/sendmail/sendmail.h     Wed Feb 20 23:12:05 2002 +0000
+++ b/gnu/dist/sendmail/include/sendmail/sendmail.h     Wed Feb 20 23:12:09 2002 +0000
@@ -10,7 +10,7 @@
  * the sendmail distribution.
  *
  *
- *     Id: sendmail.h,v 8.34.4.7 2000/10/09 16:15:26 gshapiro Exp
+ *     Id: sendmail.h,v 8.34.4.8 2001/06/01 05:06:51 gshapiro Exp
  */
 
 /*
@@ -108,7 +108,6 @@
 extern int     safefile __P((char *, UID_T, GID_T, char *, long, int, struct stat *));
 extern int     safedirpath __P((char *, UID_T, GID_T, char *, long, int, int));
 extern int     safeopen __P((char *, int, int, long));
-extern FILE    *safefopen __P((char *, int, int, long));
 extern int     dfopen __P((char *, int, int, long));
 extern bool    filechanged __P((char *, int, struct stat *));
 
diff -r b72cee74944e -r f137a11141e4 gnu/dist/sendmail/mailstats/mailstats.c
--- a/gnu/dist/sendmail/mailstats/mailstats.c   Wed Feb 20 23:12:05 2002 +0000
+++ b/gnu/dist/sendmail/mailstats/mailstats.c   Wed Feb 20 23:12:09 2002 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
  *     All rights reserved.
  * Copyright (c) 1983 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -14,14 +14,14 @@
 
 #ifndef lint
 static char copyright[] =
-"@(#) Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.\n\
+"@(#) Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.\n\
        All rights reserved.\n\
      Copyright (c) 1988, 1993\n\
        The Regents of the University of California.  All rights reserved.\n";
 #endif /* ! lint */
 
 #ifndef lint
-static char id[] = "@(#)Id: mailstats.c,v 8.53.16.12 2001/02/15 20:52:36 geir Exp";
+static char id[] = "@(#)Id: mailstats.c,v 8.53.16.13 2001/05/07 22:06:38 gshapiro Exp";
 #endif /* ! lint */
 
 #include <unistd.h>
diff -r b72cee74944e -r f137a11141e4 gnu/dist/sendmail/praliases/praliases.c
--- a/gnu/dist/sendmail/praliases/praliases.c   Wed Feb 20 23:12:05 2002 +0000
+++ b/gnu/dist/sendmail/praliases/praliases.c   Wed Feb 20 23:12:09 2002 +0000
@@ -21,7 +21,7 @@
 #endif /* ! lint */
 
 #ifndef lint
-static char id[] = "@(#)Id: praliases.c,v 8.59.4.18 2001/01/22 19:00:18 gshapiro Exp";
+static char id[] = "@(#)Id: praliases.c,v 8.59.4.19 2001/02/28 02:37:57 ca Exp";
 #endif /* ! lint */
 
 #include <sys/types.h>
@@ -357,12 +357,20 @@
        }
        else for (; *argv != NULL; ++argv)
        {
+               int get_res;
+
                memset(&db_key, '\0', sizeof db_key);
                memset(&db_value, '\0', sizeof db_value);
                db_key.data = *argv;
-               db_key.size = strlen(*argv) + 1;
-               if (database->smdb_get(database, &db_key,
-                                      &db_value, 0) == SMDBE_OK)
+               db_key.size = strlen(*argv);
+               get_res = database->smdb_get(database, &db_key, &db_value, 0);
+               if (get_res == SMDBE_NOT_FOUND)
+               {
+                       db_key.size++;
+                       get_res = database->smdb_get(database, &db_key,
+                                                    &db_value, 0);
+               }
+               if (get_res == SMDBE_OK)
                {
                        printf("%.*s:%.*s\n",
                               (int) db_key.size,
diff -r b72cee74944e -r f137a11141e4 gnu/dist/sendmail/sendmail/alias.c
--- a/gnu/dist/sendmail/sendmail/alias.c        Wed Feb 20 23:12:05 2002 +0000
+++ b/gnu/dist/sendmail/sendmail/alias.c        Wed Feb 20 23:12:09 2002 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
  *     All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -13,7 +13,7 @@
 #include <sendmail.h>
 
 #ifndef lint
-static char id[] = "@(#)Id: alias.c,v 8.142.4.9 2000/11/08 20:58:42 geir Exp";
+static char id[] = "@(#)Id: alias.c,v 8.142.4.11 2001/05/03 17:24:01 gshapiro Exp";
 #endif /* ! lint */
 
 # define SEPARATOR ':'
@@ -405,8 +405,9 @@
                                dprintf("aliaswait: sleeping for %u seconds\n",
                                        sleeptime);
 
+                       map->map_mflags |= MF_CLOSING;
                        map->map_class->map_close(map);
-                       map->map_mflags &= ~(MF_OPEN|MF_WRITABLE);
+                       map->map_mflags &= ~(MF_OPEN|MF_WRITABLE|MF_CLOSING);
                        (void) sleep(sleeptime);
                        sleeptime *= 2;
                        if (sleeptime > 60)
@@ -449,8 +450,9 @@
                        SuprErrs = TRUE;
                        if (isopen)
                        {
+                               map->map_mflags |= MF_CLOSING;
                                map->map_class->map_close(map);
-                               map->map_mflags &= ~(MF_OPEN|MF_WRITABLE);
+                               map->map_mflags &= ~(MF_OPEN|MF_WRITABLE|MF_CLOSING);
                        }
                        (void) rebuildaliases(map, TRUE);
                        isopen = map->map_class->map_open(map, O_RDONLY);
@@ -595,8 +597,9 @@
        /* add distinguished entries and close the database */
        if (bitset(MF_OPEN, map->map_mflags))
        {
+               map->map_mflags |= MF_CLOSING;
                map->map_class->map_close(map);
-               map->map_mflags &= ~(MF_OPEN|MF_WRITABLE);
+               map->map_mflags &= ~(MF_OPEN|MF_WRITABLE|MF_CLOSING);
        }
 
        /* restore the old signals */
@@ -827,11 +830,11 @@
                }
 
                if (al.q_paddr != NULL)
-                       free(al.q_paddr);
+                       sm_free(al.q_paddr);
                if (al.q_host != NULL)
-                       free(al.q_host);
+                       sm_free(al.q_host);
                if (al.q_user != NULL)
-                       free(al.q_user);
+                       sm_free(al.q_user);
        }
 
        CurEnv->e_to = NULL;
diff -r b72cee74944e -r f137a11141e4 gnu/dist/sendmail/sendmail/bf_torek.c
--- a/gnu/dist/sendmail/sendmail/bf_torek.c     Wed Feb 20 23:12:05 2002 +0000
+++ b/gnu/dist/sendmail/sendmail/bf_torek.c     Wed Feb 20 23:12:09 2002 +0000
@@ -11,7 +11,7 @@
  */
 
 #ifndef lint
-static char id[] = "@(#)Id: bf_torek.c,v 8.19.18.4 2001/02/14 04:07:27 gshapiro Exp";
+static char id[] = "@(#)Id: bf_torek.c,v 8.19.18.6 2001/05/08 06:52:19 gshapiro Exp";
 #endif /* ! lint */
 
 #if SFIO
@@ -26,9 +26,12 @@
 #include <string.h>
 #include <errno.h>
 #include <stdio.h>
-#ifndef BF_STANDALONE
+#ifdef BF_STANDALONE
+# define sm_free free
+# define xalloc malloc
+#else /* BF_STANDALONE */
 # include "sendmail.h"
-#endif /* ! BF_STANDALONE */
+#endif /* BF_STANDALONE */
 #include "bf_torek.h"
 #include "bf.h"
 
@@ -90,7 +93,7 @@
        }
 
        /* Allocate memory */
-       bfp = (struct bf *)malloc(sizeof(struct bf));
+       bfp = (struct bf *)xalloc(sizeof(struct bf));
        if (bfp == NULL)
        {
                errno = ENOMEM;
@@ -100,10 +103,10 @@
        /* A zero bsize is valid, just don't allocate memory */
        if (bsize > 0)
        {
-               bfp->bf_buf = (char *)malloc(bsize);
+               bfp->bf_buf = (char *)xalloc(bsize);
                if (bfp->bf_buf == NULL)
                {
-                       free(bfp);
+                       sm_free(bfp);
                        errno = ENOMEM;
                        return NULL;
                }
@@ -119,12 +122,12 @@
        bfp->bf_bufsize = bsize;
        bfp->bf_buffilled = 0;
        l = strlen(filename) + 1;
-       bfp->bf_filename = (char *)malloc(l);
+       bfp->bf_filename = (char *)xalloc(l);
        if (bfp->bf_filename == NULL)
        {
-               free(bfp);
                if (bfp->bf_buf != NULL)
-                       free(bfp->bf_buf);
+                       sm_free(bfp->bf_buf);
+               sm_free(bfp);
                errno = ENOMEM;
                return NULL;
        }
@@ -142,10 +145,10 @@
        {
                /* Just in case free() sets errno */
                save_errno = errno;
-               free(bfp);
-               free(bfp->bf_filename);
+               sm_free(bfp->bf_filename);
                if (bfp->bf_buf != NULL)
-                       free(bfp->bf_buf);
+                       sm_free(bfp->bf_buf);
+               sm_free(bfp);
                errno = save_errno;
                return NULL;
        }
@@ -285,7 +288,7 @@
        {
                /* Don't need buffer anymore; free it */
                bfp->bf_bufsize = 0;
-               free(bfp->bf_buf);
+               sm_free(bfp->bf_buf);
        }
        return 0;
 }
@@ -317,7 +320,6 @@
 
        /* check to see if there is an error on the stream */
        err = ferror(fp);
-
        (void) fflush(fp);
 
        /*
@@ -530,10 +532,10 @@
 
        /* Need to free the buffer */
        if (bfp->bf_bufsize > 0)
-               free(bfp->bf_buf);
+               sm_free(bfp->bf_buf);
 
        /* Finally, free the structure */
-       free(bfp);
+       sm_free(bfp);
 
        return 0;
 }
diff -r b72cee74944e -r f137a11141e4 gnu/dist/sendmail/sendmail/envelope.c
--- a/gnu/dist/sendmail/sendmail/envelope.c     Wed Feb 20 23:12:05 2002 +0000
+++ b/gnu/dist/sendmail/sendmail/envelope.c     Wed Feb 20 23:12:09 2002 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
  *     All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -12,7 +12,7 @@
  */
 
 #ifndef lint
-static char id[] = "@(#)Id: envelope.c,v 8.180.14.6 2000/11/30 00:39:46 gshapiro Exp";
+static char id[] = "@(#)Id: envelope.c,v 8.180.14.10 2001/05/03 17:24:06 gshapiro Exp";
 #endif /* ! lint */
 
 #include <sendmail.h>
@@ -132,7 +132,7 @@
        */
 
        now = curtime();
-       if (now > e->e_ctime + TimeOuts.to_q_return[e->e_timeoutclass])



Home | Main Index | Thread Index | Old Index