changes to work under a V6 system -- mostly compilation flags
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 25 Sep 1981 01:31:13 +0000 (17:31 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 25 Sep 1981 01:31:13 +0000 (17:31 -0800)
SCCS-vsn: usr.sbin/sendmail/src/arpadate.c 3.7
SCCS-vsn: usr.sbin/sendmail/src/conf.c 3.32
SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 3.45
SCCS-vsn: usr.sbin/sendmail/src/useful.h 3.4
SCCS-vsn: usr.sbin/sendmail/src/util.c 3.9
SCCS-vsn: usr.sbin/sendmail/src/version.c 3.39
SCCS-vsn: usr.sbin/sendmail/src/main.c 3.40
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 3.15
SCCS-vsn: usr.sbin/sendmail/src/stab.c 3.9

usr/src/usr.sbin/sendmail/src/arpadate.c
usr/src/usr.sbin/sendmail/src/conf.c
usr/src/usr.sbin/sendmail/src/main.c
usr/src/usr.sbin/sendmail/src/readcf.c
usr/src/usr.sbin/sendmail/src/sendmail.h
usr/src/usr.sbin/sendmail/src/stab.c
usr/src/usr.sbin/sendmail/src/useful.h
usr/src/usr.sbin/sendmail/src/util.c
usr/src/usr.sbin/sendmail/src/version.c

index 38a6e65..4e8ecfa 100644 (file)
@@ -4,8 +4,9 @@
 # include <sys/types.h>
 # include <sys/timeb.h>
 # endif
 # include <sys/types.h>
 # include <sys/timeb.h>
 # endif
+# include "useful.h"
 
 
-static char SccsId[] = "@(#)arpadate.c 3.6.1.1 %G%";
+static char SccsId[] = "@(#)arpadate.c 3.7     %G%";
 
 /*
 **  ARPADATE -- Create date in ARPANET format
 
 /*
 **  ARPADATE -- Create date in ARPANET format
@@ -33,8 +34,6 @@ static char SccsId[] = "@(#)arpadate.c        3.6.1.1 %G%";
 **             the format is and work appropriately.
 */
 
 **             the format is and work appropriately.
 */
 
-# define NULL          0
-
 struct cvttab
 {
        char    *old;
 struct cvttab
 {
        char    *old;
index c461672..6e5dafb 100644 (file)
@@ -36,7 +36,7 @@
 
 
 
 
 
 
-static char SccsId[] = "@(#)conf.c     3.31.1.1        %G%";
+static char SccsId[] = "@(#)conf.c     3.32    %G%";
 \f/*
 **  Header info table
 **     Final (null) entry contains the flags used for any other field.
 \f/*
 **  Header info table
 **     Final (null) entry contains the flags used for any other field.
@@ -211,6 +211,7 @@ fdopen(fd, type)
 **             none.
 */
 
 **             none.
 */
 
+char *
 index(s, c)
        register char *s;
        register char c;
 index(s, c)
        register char *s;
        register char c;
@@ -384,11 +385,21 @@ bool
 checkcompat(to)
        register ADDRESS *to;
 {
 checkcompat(to)
        register ADDRESS *to;
 {
+       register STAB *s;
+
        if (to->q_mailer != MN_LOCAL && MsgSize > 100000)
        {
                usrerr("Message exceeds 100000 bytes");
                NoReturn++;
                return (FALSE);
        }
        if (to->q_mailer != MN_LOCAL && MsgSize > 100000)
        {
                usrerr("Message exceeds 100000 bytes");
                NoReturn++;
                return (FALSE);
        }
+# ifdef ING70
+       s = stab("arpa", ST_MAILER, ST_FIND);
+       if (s != NULL && From.q_mailer != MN_LOCAL && to->q_mailer == s->st_mailer->m_mno)
+       {
+               usrerr("No ARPA mail through this machine: see your system administration");
+               return (FALSE);
+       }
+# endif ING70
        return (TRUE);
 }
        return (TRUE);
 }
index 3eebb93..373a8eb 100644 (file)
@@ -6,7 +6,7 @@
 # include <syslog.h>
 # endif LOG
 
 # include <syslog.h>
 # endif LOG
 
-static char    SccsId[] = "@(#)main.c  3.39    %G%";
+static char    SccsId[] = "@(#)main.c  3.40    %G%";
 
 /*
 **  SENDMAIL -- Post mail to a set of destinations.
 
 /*
 **  SENDMAIL -- Post mail to a set of destinations.
@@ -389,6 +389,7 @@ main(argc, argv)
 
        readcf(ConfFile, safecf);
 
 
        readcf(ConfFile, safecf);
 
+# ifndef V6
        p = getenv("HOME");
        if (p != NULL)
        {
        p = getenv("HOME");
        if (p != NULL)
        {
@@ -399,6 +400,7 @@ main(argc, argv)
                if (access(cfbuf, 2) == 0)
                        readcf(cfbuf, FALSE);
        }
                if (access(cfbuf, 2) == 0)
                        readcf(cfbuf, FALSE);
        }
+# endif V6
 
        initaliases(AliasFile, aliasinit);
 # ifdef DBM
 
        initaliases(AliasFile, aliasinit);
 # ifdef DBM
index 72de016..b30b251 100644 (file)
@@ -1,6 +1,6 @@
 # include "sendmail.h"
 
 # include "sendmail.h"
 
-static char SccsId[] = "@(#)readcf.c   3.14    %G%";
+static char SccsId[] = "@(#)readcf.c   3.15    %G%";
 
 /*
 **  READCF -- read control file.
 
 /*
 **  READCF -- read control file.
@@ -279,6 +279,7 @@ makemailer(line, safe)
        char *margv[MAXPV + 1];
        register int i;
        extern int NextMailer;
        char *margv[MAXPV + 1];
        register int i;
        extern int NextMailer;
+       STAB *s;
 
        if (NextMailer >= MAXMAILERS)
        {
 
        if (NextMailer >= MAXMAILERS)
        {
@@ -313,6 +314,7 @@ makemailer(line, safe)
        m->m_from = newstr(mfrom);
        m->m_badstat = EX_UNAVAILABLE;
        m->m_sendq = NULL;
        m->m_from = newstr(mfrom);
        m->m_badstat = EX_UNAVAILABLE;
        m->m_sendq = NULL;
+       m->m_mno = NextMailer;
        Mailer[NextMailer++] = m;
 
        /* collect the argument vector */
        Mailer[NextMailer++] = m;
 
        /* collect the argument vector */
@@ -326,6 +328,8 @@ makemailer(line, safe)
        /* save the argv */
        m->m_argv = (char **) xalloc((unsigned) (sizeof margv[0] * i));
        bmove((char *) margv, (char *) m->m_argv, sizeof margv[0] * i);
        /* save the argv */
        m->m_argv = (char **) xalloc((unsigned) (sizeof margv[0] * i));
        bmove((char *) margv, (char *) m->m_argv, sizeof margv[0] * i);
+       s = stab(m->m_name, ST_MAILER, ST_ENTER);
+       s->s_mailer = m;
 }
 \f/*
 **  PRINTRULES -- print rewrite rules (for debugging)
 }
 \f/*
 **  PRINTRULES -- print rewrite rules (for debugging)
index 9482470..227fc52 100644 (file)
@@ -1,7 +1,7 @@
 /*
 **  SENDMAIL.H -- Global definitions for sendmail.
 **
 /*
 **  SENDMAIL.H -- Global definitions for sendmail.
 **
-**     @(#)sendmail.h  3.44.1.1        %G%
+**     @(#)sendmail.h  3.45    %G%
 */
 
 
 */
 
 
@@ -100,6 +100,7 @@ struct mailer
        char    *m_mailer;      /* pathname of the mailer to use */
        u_long  m_flags;        /* status flags, see below */
        short   m_badstat;      /* the status code to use on unknown error */
        char    *m_mailer;      /* pathname of the mailer to use */
        u_long  m_flags;        /* status flags, see below */
        short   m_badstat;      /* the status code to use on unknown error */
+       short   m_mno;          /* mailer number internally */
        char    *m_from;        /* pattern for From: header */
        char    **m_argv;       /* template argument vector */
        ADDRESS *m_sendq;       /* list of addresses to send to */
        char    *m_from;        /* pattern for From: header */
        char    **m_argv;       /* template argument vector */
        ADDRESS *m_sendq;       /* list of addresses to send to */
index f87ae95..e61b8bd 100644 (file)
@@ -1,6 +1,6 @@
 # include "sendmail.h"
 
 # include "sendmail.h"
 
-static char SccsId[] = "@(#)stab.c     3.8     %G%";
+static char SccsId[] = "@(#)stab.c     3.9     %G%";
 
 /*
 **  STAB -- manage the symbol table
 
 /*
 **  STAB -- manage the symbol table
@@ -54,16 +54,13 @@ stab(name, type, op)
                hfunc = ((hfunc << 7) | lower(*p)) % STABSIZE;
 
 # ifdef DEBUG
                hfunc = ((hfunc << 7) | lower(*p)) % STABSIZE;
 
 # ifdef DEBUG
-       if (Debug > 15)
+       if (Debug > 5)
                printf("(hfunc=%d) ", hfunc);
 # endif DEBUG
 
        ps = &SymTab[hfunc];
        while ((s = *ps) != NULL && (!sameword(name, s->s_name) || s->s_type != type))
                printf("(hfunc=%d) ", hfunc);
 # endif DEBUG
 
        ps = &SymTab[hfunc];
        while ((s = *ps) != NULL && (!sameword(name, s->s_name) || s->s_type != type))
-       {
                ps = &s->s_next;
                ps = &s->s_next;
-               s = s->s_next;
-       }
 
        /*
        **  Dispose of the entry.
 
        /*
        **  Dispose of the entry.
index 150fd6a..c36cd05 100644 (file)
@@ -1,7 +1,7 @@
 /*
 **  USEFUL.H -- Some useful stuff.
 **
 /*
 **  USEFUL.H -- Some useful stuff.
 **
-**     @(#)useful.h    3.3     %G%
+**     @(#)useful.h    3.4     %G%
 */
 
 # ifndef makedev
 */
 
 # ifndef makedev
@@ -31,4 +31,9 @@ extern long   time();
 extern char    *ctime();
 # ifndef V6
 extern char    *getenv();
 extern char    *ctime();
 # ifndef V6
 extern char    *getenv();
-# endif
+# else V6
+typedef char   *u_short;
+typedef long   u_long;
+typedef char   u_char;
+typedef int    void;
+# endif V6
index 0fc5563..12c5967 100644 (file)
@@ -4,7 +4,7 @@
 # include <ctype.h>
 # include "conf.h"
 
 # include <ctype.h>
 # include "conf.h"
 
-static char    SccsId[] = "@(#)util.c  3.8.1.1 %G%";
+static char    SccsId[] = "@(#)util.c  3.9     %G%";
 
 /*
 **  STRIPQUOTES -- Strip quotes & quote bits from a string.
 
 /*
 **  STRIPQUOTES -- Strip quotes & quote bits from a string.
@@ -364,6 +364,8 @@ buildfname(p, login, buf)
 {
        register char *bp = buf;
 
 {
        register char *bp = buf;
 
+       if (*p == '*')
+               p++;
        while (*p != '\0' && *p != ',' && *p != ';')
        {
                if (*p == '&')
        while (*p != '\0' && *p != ',' && *p != ';')
        {
                if (*p == '&')
index 4f6d625..e90cccc 100644 (file)
@@ -1,3 +1,3 @@
-static char    SccsId[] = "@(#)SendMail version 3.38.1.1 of %G%";
+static char    SccsId[] = "@(#)SendMail version 3.39 of %G%";
 
 
-char   Version[] = "3.38.1.1 [%G%]";
+char   Version[] = "3.39 [%G%]";