From: Eric Allman Date: Fri, 25 Sep 1981 01:31:13 +0000 (-0800) Subject: changes to work under a V6 system -- mostly compilation flags X-Git-Tag: BSD-4_1_snap-Snapshot-Development~814 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/b14547d587486810f0e96caafd438a030c627dc3 changes to work under a V6 system -- mostly compilation flags 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 --- diff --git a/usr/src/usr.sbin/sendmail/src/arpadate.c b/usr/src/usr.sbin/sendmail/src/arpadate.c index 38a6e65522..4e8ecfa8a7 100644 --- a/usr/src/usr.sbin/sendmail/src/arpadate.c +++ b/usr/src/usr.sbin/sendmail/src/arpadate.c @@ -4,8 +4,9 @@ # include # include # 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 @@ -33,8 +34,6 @@ static char SccsId[] = "@(#)arpadate.c 3.6.1.1 %G%"; ** the format is and work appropriately. */ -# define NULL 0 - struct cvttab { char *old; diff --git a/usr/src/usr.sbin/sendmail/src/conf.c b/usr/src/usr.sbin/sendmail/src/conf.c index c4616723d6..6e5dafbe16 100644 --- a/usr/src/usr.sbin/sendmail/src/conf.c +++ b/usr/src/usr.sbin/sendmail/src/conf.c @@ -36,7 +36,7 @@ -static char SccsId[] = "@(#)conf.c 3.31.1.1 %G%"; +static char SccsId[] = "@(#)conf.c 3.32 %G%"; /* ** Header info table ** Final (null) entry contains the flags used for any other field. @@ -211,6 +211,7 @@ fdopen(fd, type) ** none. */ +char * index(s, c) register char *s; register char c; @@ -384,11 +385,21 @@ bool checkcompat(to) register ADDRESS *to; { + register STAB *s; + 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); } diff --git a/usr/src/usr.sbin/sendmail/src/main.c b/usr/src/usr.sbin/sendmail/src/main.c index 3eebb93ee0..373a8eb586 100644 --- a/usr/src/usr.sbin/sendmail/src/main.c +++ b/usr/src/usr.sbin/sendmail/src/main.c @@ -6,7 +6,7 @@ # include # 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. @@ -389,6 +389,7 @@ main(argc, argv) readcf(ConfFile, safecf); +# ifndef V6 p = getenv("HOME"); if (p != NULL) { @@ -399,6 +400,7 @@ main(argc, argv) if (access(cfbuf, 2) == 0) readcf(cfbuf, FALSE); } +# endif V6 initaliases(AliasFile, aliasinit); # ifdef DBM diff --git a/usr/src/usr.sbin/sendmail/src/readcf.c b/usr/src/usr.sbin/sendmail/src/readcf.c index 72de016b87..b30b25163c 100644 --- a/usr/src/usr.sbin/sendmail/src/readcf.c +++ b/usr/src/usr.sbin/sendmail/src/readcf.c @@ -1,6 +1,6 @@ # include "sendmail.h" -static char SccsId[] = "@(#)readcf.c 3.14 %G%"; +static char SccsId[] = "@(#)readcf.c 3.15 %G%"; /* ** READCF -- read control file. @@ -279,6 +279,7 @@ makemailer(line, safe) char *margv[MAXPV + 1]; register int i; extern int NextMailer; + STAB *s; 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_mno = NextMailer; 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); + s = stab(m->m_name, ST_MAILER, ST_ENTER); + s->s_mailer = m; } /* ** PRINTRULES -- print rewrite rules (for debugging) diff --git a/usr/src/usr.sbin/sendmail/src/sendmail.h b/usr/src/usr.sbin/sendmail/src/sendmail.h index 9482470cd8..227fc5297b 100644 --- a/usr/src/usr.sbin/sendmail/src/sendmail.h +++ b/usr/src/usr.sbin/sendmail/src/sendmail.h @@ -1,7 +1,7 @@ /* ** 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 */ + 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 */ diff --git a/usr/src/usr.sbin/sendmail/src/stab.c b/usr/src/usr.sbin/sendmail/src/stab.c index f87ae9524a..e61b8bd4ce 100644 --- a/usr/src/usr.sbin/sendmail/src/stab.c +++ b/usr/src/usr.sbin/sendmail/src/stab.c @@ -1,6 +1,6 @@ # include "sendmail.h" -static char SccsId[] = "@(#)stab.c 3.8 %G%"; +static char SccsId[] = "@(#)stab.c 3.9 %G%"; /* ** STAB -- manage the symbol table @@ -54,16 +54,13 @@ stab(name, type, op) 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)) - { ps = &s->s_next; - s = s->s_next; - } /* ** Dispose of the entry. diff --git a/usr/src/usr.sbin/sendmail/src/useful.h b/usr/src/usr.sbin/sendmail/src/useful.h index 150fd6adca..c36cd0553a 100644 --- a/usr/src/usr.sbin/sendmail/src/useful.h +++ b/usr/src/usr.sbin/sendmail/src/useful.h @@ -1,7 +1,7 @@ /* ** USEFUL.H -- Some useful stuff. ** -** @(#)useful.h 3.3 %G% +** @(#)useful.h 3.4 %G% */ # ifndef makedev @@ -31,4 +31,9 @@ extern long time(); 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 diff --git a/usr/src/usr.sbin/sendmail/src/util.c b/usr/src/usr.sbin/sendmail/src/util.c index 0fc55632b8..12c5967203 100644 --- a/usr/src/usr.sbin/sendmail/src/util.c +++ b/usr/src/usr.sbin/sendmail/src/util.c @@ -4,7 +4,7 @@ # include # 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. @@ -364,6 +364,8 @@ buildfname(p, login, buf) { register char *bp = buf; + if (*p == '*') + p++; while (*p != '\0' && *p != ',' && *p != ';') { if (*p == '&') diff --git a/usr/src/usr.sbin/sendmail/src/version.c b/usr/src/usr.sbin/sendmail/src/version.c index 4f6d625656..e90cccc36b 100644 --- a/usr/src/usr.sbin/sendmail/src/version.c +++ b/usr/src/usr.sbin/sendmail/src/version.c @@ -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%]";