alarm() and sleep() calls {arg was unsigned, is now int}.
SCCS-vsn: usr.sbin/sendmail/src/alias.c 3.33
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 3.81
SCCS-vsn: usr.sbin/sendmail/src/collect.c 3.40
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 3.43
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 3.31
SCCS-vsn: usr.sbin/sendmail/src/util.c 3.16
SCCS-vsn: usr.sbin/sendmail/src/version.c 3.111
SCCS-vsn: usr.sbin/sendmail/src/main.c 3.78
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 3.36
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 3.26
SCCS-vsn: usr.sbin/sendmail/src/macro.c 3.13
SCCS-vsn: bin/rmail/rmail.c 3.11
SCCS-vsn: usr.bin/vacation/vacation.c 3.7
SCCS-vsn: usr.sbin/sendmail/src/usersmtp.c 3.11
SCCS-vsn: usr.sbin/sendmail/src/daemon.c 3.13
SCCS-vsn: usr.sbin/sendmail/src/queue.c 3.16
16 files changed:
# include "useful.h"
# include "conf.h"
# include "useful.h"
# include "conf.h"
-SCCSID(@(#)rmail.c 3.10 (Berkeley) %G%);
+SCCSID(@(#)rmail.c 3.11 (Berkeley) %G%);
extern FILE *popen();
extern char *index();
extern FILE *popen();
extern char *index();
- strcpy(from, "");
- strcpy(ufrom, "/dev/null");
+ (void) strcpy(from, "");
+ (void) strcpy(ufrom, "/dev/null");
if (p != NULL)
{
*p = '\0';
if (p != NULL)
{
*p = '\0';
+ (void) strcpy(sys, uf);
}
if (cp != NULL)
(void) sscanf(cp, "remote from %s", sys);
}
if (cp != NULL)
(void) sscanf(cp, "remote from %s", sys);
- strcat(from, sys);
- strcat(from, "!");
+ (void) strcat(from, sys);
+ (void) strcat(from, "!");
#ifdef DEBUG
if (Debug)
printf("ufrom='%s', sys='%s', from now '%s'\n", uf, sys, from);
#endif
}
#ifdef DEBUG
if (Debug)
printf("ufrom='%s', sys='%s', from now '%s'\n", uf, sys, from);
#endif
}
+ (void) strcat(from, uf);
(void) sprintf(cmd, "%s -em -f%s", MAILER, from);
while (*++argv != NULL)
{
(void) sprintf(cmd, "%s -em -f%s", MAILER, from);
while (*++argv != NULL)
{
+ (void) strcat(cmd, " '");
- strncat(cmd, *argv + 1, strlen(*argv) - 2);
+ (void) strncat(cmd, *argv + 1, strlen(*argv) - 2);
- strcat(cmd, *argv);
- strcat(cmd, "'");
+ (void) strcat(cmd, *argv);
+ (void) strcat(cmd, "'");
}
#ifdef DEBUG
if (Debug)
}
#ifdef DEBUG
if (Debug)
# include "useful.h"
# include "userdbm.h"
# include "useful.h"
# include "userdbm.h"
-SCCSID(@(#)vacation.c 3.6 %G%);
+SCCSID(@(#)vacation.c 3.7 %G%);
/*
** VACATION -- return a message to the sender when on vacation.
/*
** VACATION -- return a message to the sender when on vacation.
exit(EX_NOUSER);
}
homedir = newstr(pw->pw_dir);
exit(EX_NOUSER);
}
homedir = newstr(pw->pw_dir);
- strcpy(buf, homedir);
- strcat(buf, "/.vacation");
+ (void) strcpy(buf, homedir);
+ (void) strcat(buf, "/.vacation");
dbminit(buf);
/* read message from standard input (just from line) */
dbminit(buf);
/* read message from standard input (just from line) */
setknows(from, buf);
/* send the message back */
setknows(from, buf);
/* send the message back */
+ (void) strcat(buf, ".msg");
sendmessage(buf, from, myname);
/* never returns */
}
sendmessage(buf, from, myname);
/* never returns */
}
homedir = getenv("HOME");
if (homedir == NULL)
syserr("No home!");
homedir = getenv("HOME");
if (homedir == NULL)
syserr("No home!");
- strcpy(buf, homedir);
- strcat(buf, "/.vacation.dir");
+ (void) strcpy(buf, homedir);
+ (void) strcat(buf, "/.vacation.dir");
if (close(creat(buf, 0644)) < 0)
syserr("Cannot create %s", buf);
if (close(creat(buf, 0644)) < 0)
syserr("Cannot create %s", buf);
- strcpy(buf, homedir);
- strcat(buf, "/.vacation.pag");
+ (void) strcpy(buf, homedir);
+ (void) strcat(buf, "/.vacation.pag");
if (close(creat(buf, 0644)) < 0)
syserr("Cannot create %s", buf);
}
if (close(creat(buf, 0644)) < 0)
syserr("Cannot create %s", buf);
}
# include "sendmail.h"
# ifdef DBM
# include "sendmail.h"
# ifdef DBM
-SCCSID(@(#)alias.c 3.32 %G% (with DBM));
+SCCSID(@(#)alias.c 3.33 %G% (with DBM));
-SCCSID(@(#)alias.c 3.32 %G% (without DBM));
+SCCSID(@(#)alias.c 3.33 %G% (without DBM));
char buf[MAXNAME+2];
register char *p;
char buf[MAXNAME+2];
register char *p;
- strcpy(buf, "/");
- strcat(buf, a->q_host);
+ (void) strcpy(buf, "/");
+ (void) strcat(buf, a->q_host);
makelower(buf);
p = aliaslookup(buf);
makelower(buf);
p = aliaslookup(buf);
# include <errno.h>
# include "sendmail.h"
# include <errno.h>
# include "sendmail.h"
-SCCSID(@(#)collect.c 3.39 %G%);
+SCCSID(@(#)collect.c 3.40 %G%);
/*
** COLLECT -- read & parse message header & make temp file.
/*
** COLLECT -- read & parse message header & make temp file.
** Create the temp file name and create the file.
*/
** Create the temp file name and create the file.
*/
- strcpy(tempfname, QueueDir);
- strcat(tempfname, "/dfXXXXXX");
+ (void) strcpy(tempfname, QueueDir);
+ (void) strcat(tempfname, "/dfXXXXXX");
(void) mktemp(tempfname);
if ((tf = dfopen(tempfname, "w")) == NULL)
{
(void) mktemp(tempfname);
if ((tf = dfopen(tempfname, "w")) == NULL)
{
NoReturn = TRUE;
finis();
}
NoReturn = TRUE;
finis();
}
- chmod(tempfname, 0600);
+ (void) chmod(tempfname, 0600);
CurEnv->e_df = tempfname;
/*
CurEnv->e_df = tempfname;
/*
# include <sys/mx.h>
#ifndef DAEMON
# include <sys/mx.h>
#ifndef DAEMON
-SCCSID(@(#)daemon.c 3.12 %G% (w/o daemon mode));
+SCCSID(@(#)daemon.c 3.13 %G% (w/o daemon mode));
#else
# include <sys/socket.h>
# include <net/in.h>
#else
# include <sys/socket.h>
# include <net/in.h>
-SCCSID(@(#)daemon.c 3.12 %G% (with daemon mode));
+SCCSID(@(#)daemon.c 3.13 %G% (with daemon mode));
/*
** DAEMON.C -- routines to use when running as a daemon.
/*
** DAEMON.C -- routines to use when running as a daemon.
printf("makeconnection (%s)\n", host);
# endif DEBUG
printf("makeconnection (%s)\n", host);
# endif DEBUG
- s = socket(SOCK_STREAM, 0, 0, 0);
+ s = socket(SOCK_STREAM, 0, (struct sockaddr_in *) 0, 0);
if (s < 0)
{
syserr("makeconnection: no socket");
if (s < 0)
{
syserr("makeconnection: no socket");
# include <syslog.h>
# endif LOG
# include <syslog.h>
# endif LOG
-SCCSID(@(#)deliver.c 3.80 %G%);
+SCCSID(@(#)deliver.c 3.81 %G%);
/*
** DELIVER -- Deliver a message to a list of addresses.
/*
** DELIVER -- Deliver a message to a list of addresses.
*pvp = NULL;
/* send the initial SMTP protocol */
*pvp = NULL;
/* send the initial SMTP protocol */
- smtpinit(m, pv, (ADDRESS *) NULL);
+ i = smtpinit(m, pv, (ADDRESS *) NULL);
# ifdef QUEUE
if (i == EX_TEMPFAIL)
{
# ifdef QUEUE
if (i == EX_TEMPFAIL)
{
if (clever)
smtpquit(pv[0]);
# endif SMTP
if (clever)
smtpquit(pv[0]);
# endif SMTP
+ define('g', (char *) NULL);
+ define('g', (char *) NULL);
pid = fORKfN();\
if (pid >= 0)\
break;\
pid = fORKfN();\
if (pid >= 0)\
break;\
- sleep((unsigned) NFORKTRIES - i);\
+ sleep(NFORKTRIES - i);\
** Output the body of the message
*/
** Output the body of the message
*/
+#ifdef lint
+ /* m will be needed later for complete smtp emulation */
+ if (m == NULL)
+ return;
+#endif lint
+
if (TempFile != NULL)
{
rewind(TempFile);
if (TempFile != NULL)
{
rewind(TempFile);
extern char **prescan();
register char **pvp;
extern char *getxpart();
extern char **prescan();
register char **pvp;
extern char *getxpart();
+ extern ADDRESS *buildaddr();
/*
** See if this mailer wants the name to be rewritten. There are
/*
** See if this mailer wants the name to be rewritten. There are
*/
if (!bitset(M_RELRCPT, m->m_flags) && !force)
*/
if (!bitset(M_RELRCPT, m->m_flags) && !force)
/*
** Do general rewriting of name.
/*
** Do general rewriting of name.
if (p == NULL)
goto failure;
*p = '\0';
if (p == NULL)
goto failure;
*p = '\0';
- strcpy(buf, ifrom);
- strcat(buf, " at ");
+ (void) strcpy(buf, ifrom);
+ (void) strcat(buf, " at ");
if (strcmp(buf, efrom) == 0)
goto success;
if (strcmp(buf, efrom) == 0)
goto success;
# include "sendmail.h"
# include "conf.h"
# include "sendmail.h"
# include "conf.h"
-SCCSID(@(#)macro.c 3.12 %G%);
+SCCSID(@(#)macro.c 3.13 %G%);
/*
** EXPAND -- macro expand a string using $x escapes.
/*
** EXPAND -- macro expand a string using $x escapes.
# include <syslog.h>
# endif LOG
# include <syslog.h>
# endif LOG
-SCCSID(@(#)main.c 3.77 %G%);
+SCCSID(@(#)main.c 3.78 %G%);
/*
** SENDMAIL -- Post mail to a set of destinations.
/*
** SENDMAIL -- Post mail to a set of destinations.
/* send back return receipts as requested */
if (CurEnv->e_sendreceipt && ExitStat == EX_OK)
/* send back return receipts as requested */
if (CurEnv->e_sendreceipt && ExitStat == EX_OK)
- returntosender("Return receipt", &CurEnv->e_from, FALSE);
+ (void) returntosender("Return receipt", &CurEnv->e_from, FALSE);
/* mail back the transcript on errors */
if (FatalErrors)
/* mail back the transcript on errors */
if (FatalErrors)
{
if (rindex(p, '/') != NULL)
p = rindex(p, '/') + 1;
{
if (rindex(p, '/') != NULL)
p = rindex(p, '/') + 1;
+ (void) strcpy(ybuf, p);
newenvelope(e)
register ENVELOPE *e;
{
newenvelope(e)
register ENVELOPE *e;
{
- bmove(CurEnv, e, sizeof *e);
+ bmove((char *) CurEnv, (char *) e, sizeof *e);
e->e_header = NULL;
e->e_queueup = FALSE;
e->e_oldstyle = FALSE;
e->e_header = NULL;
e->e_queueup = FALSE;
e->e_oldstyle = FALSE;
-SCCSID(@(#)parseaddr.c 3.42 %G%);
+SCCSID(@(#)parseaddr.c 3.43 %G%);
/*
** PARSE -- Parse an address
/*
** PARSE -- Parse an address
{
firstime = FALSE;
expand("$o", buf, &buf[sizeof buf - 1], CurEnv);
{
firstime = FALSE;
expand("$o", buf, &buf[sizeof buf - 1], CurEnv);
- strcat(buf, DELIMCHARS);
+ (void) strcat(buf, DELIMCHARS);
}
if (c == MATCHCLASS || c == MATCHREPL)
return (ONEMORE);
}
if (c == MATCHCLASS || c == MATCHREPL)
return (ONEMORE);
while (*++tv != NULL)
{
if (buf[0] != '\0')
while (*++tv != NULL)
{
if (buf[0] != '\0')
- strcat(buf, " ");
- strcat(buf, *tv);
+ (void) strcat(buf, " ");
+ (void) strcat(buf, *tv);
}
usrerr(buf);
return (NULL);
}
usrerr(buf);
return (NULL);
}
buf[0] = '\0';
while (*tv != NULL && **tv != CANONUSER)
}
buf[0] = '\0';
while (*tv != NULL && **tv != CANONUSER)
+ (void) strcat(buf, *tv++);
a->q_host = newstr(buf);
}
else
a->q_host = newstr(buf);
}
else
# include <errno.h>
# ifndef QUEUE
# include <errno.h>
# ifndef QUEUE
-SCCSID(@(#)queue.c 3.15 %G% (no queueing));
+SCCSID(@(#)queue.c 3.16 %G% (no queueing));
-SCCSID(@(#)queue.c 3.15 %G%);
+SCCSID(@(#)queue.c 3.16 %G%);
/*
** QUEUEUP -- queue a message up for future transmission.
/*
** QUEUEUP -- queue a message up for future transmission.
** Create control file.
*/
** Create control file.
*/
- strcpy(cf, QueueDir);
- strcat(cf, "/tfXXXXXX");
+ (void) strcpy(cf, QueueDir);
+ (void) strcat(cf, "/tfXXXXXX");
(void) mktemp(cf);
cfp = fopen(cf, "w");
if (cfp == NULL)
(void) mktemp(cf);
cfp = fopen(cf, "w");
if (cfp == NULL)
- strcpy(buf, QueueDir);
- strcat(buf, "/dfXXXXXX");
+ (void) strcpy(buf, QueueDir);
+ (void) strcat(buf, "/dfXXXXXX");
e->e_df = newstr(mktemp(buf));
dfp = fopen(e->e_df, "w");
if (dfp == NULL)
{
syserr("queueup: cannot create %s", e->e_df);
e->e_df = newstr(mktemp(buf));
dfp = fopen(e->e_df, "w");
if (dfp == NULL)
{
syserr("queueup: cannot create %s", e->e_df);
return;
}
(*e->e_putbody)(dfp, Mailer[1], FALSE);
return;
}
(*e->e_putbody)(dfp, Mailer[1], FALSE);
if (link(cf, buf) < 0)
syserr("cannot link(%s, %s), df=%s", cf, buf, e->e_df);
else
if (link(cf, buf) < 0)
syserr("cannot link(%s, %s), df=%s", cf, buf, e->e_df);
else
}
\f/*
** RUNQUEUE -- run the jobs in the queue.
}
\f/*
** RUNQUEUE -- run the jobs in the queue.
if (QueueIntvl != 0)
{
(void) signal(SIGALRM, reordersig);
if (QueueIntvl != 0)
{
(void) signal(SIGALRM, reordersig);
- (void) alarm((unsigned) QueueIntvl);
+ (void) alarm(QueueIntvl);
- (void) alarm((unsigned) 0);
*/
(void) signal(SIGALRM, reordersig);
*/
(void) signal(SIGALRM, reordersig);
- (void) alarm((unsigned) QueueIntvl);
+ (void) alarm(QueueIntvl);
}
\f/*
** ORDERQ -- order the work queue.
}
\f/*
** ORDERQ -- order the work queue.
continue;
/* yes -- find the control file location */
continue;
/* yes -- find the control file location */
- strcpy(cbuf, QueueDir);
- strcat(cbuf, "/");
+ (void) strcpy(cbuf, QueueDir);
+ (void) strcat(cbuf, "/");
+ (void) strcpy(p, d->d_name);
/* open control file */
cf = fopen(cbuf, "r");
/* open control file */
cf = fopen(cbuf, "r");
-SCCSID(@(#)readcf.c 3.25 %G%);
+SCCSID(@(#)readcf.c 3.26 %G%);
/*
** READCF -- read control file.
/*
** READCF -- read control file.
margv[i++] = NULL;
/* save the argv */
margv[i++] = NULL;
/* save the argv */
- m->m_argv = (char **) xalloc((unsigned) (sizeof margv[0] * i));
+ m->m_argv = (char **) xalloc(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;
bmove((char *) margv, (char *) m->m_argv, sizeof margv[0] * i);
s = stab(m->m_name, ST_MAILER, ST_ENTER);
s->s_mailer = m;
# include "sendmail.h"
# include <sys/stat.h>
# include "sendmail.h"
# include <sys/stat.h>
-SCCSID(@(#)recipient.c 3.35 %G%);
+SCCSID(@(#)recipient.c 3.36 %G%);
/*
** SENDTO -- Designate a send list.
/*
** SENDTO -- Designate a send list.
extern bool writable();
bool quoted = FALSE;
extern bool writable();
bool quoted = FALSE;
- strcpy(buf, a->q_user);
+ (void) strcpy(buf, a->q_user);
for (p = buf; *p != '\0' && !quoted; p++)
{
if (!isascii(*p) && (*p & 0377) != (SPACESUB) & 0377)
for (p = buf; *p != '\0' && !quoted; p++)
{
if (!isascii(*p) && (*p & 0377) != (SPACESUB) & 0377)
if (strcmp(a->q_user, pw->pw_name) != 0)
{
a->q_user = newstr(pw->pw_name);
if (strcmp(a->q_user, pw->pw_name) != 0)
{
a->q_user = newstr(pw->pw_name);
- strcpy(buf, pw->pw_name);
+ (void) strcpy(buf, pw->pw_name);
}
a->q_home = newstr(pw->pw_dir);
a->q_uid = pw->pw_uid;
}
a->q_home = newstr(pw->pw_dir);
a->q_uid = pw->pw_uid;
# include <pwd.h>
# include "sendmail.h"
# include <pwd.h>
# include "sendmail.h"
-SCCSID(@(#)savemail.c 3.30 %G%);
+SCCSID(@(#)savemail.c 3.31 %G%);
/*
** SAVEMAIL -- Save mail on error
/*
** SAVEMAIL -- Save mail on error
extern char *ttypath();
static int exclusive;
typedef int (*fnptr)();
extern char *ttypath();
static int exclusive;
typedef int (*fnptr)();
- ENVELOPE errenvelope;
- register ENVELOPE *ee;
extern ENVELOPE *newenvelope();
if (exclusive++)
extern ENVELOPE *newenvelope();
if (exclusive++)
-static char *ErrorMessage;
static bool SendBody;
returntosender(msg, returnto, sendbody)
static bool SendBody;
returntosender(msg, returnto, sendbody)
/* if the error message was "queued", make that happen */
if (bitset(QQUEUEUP, to_addr.q_flags))
/* if the error message was "queued", make that happen */
if (bitset(QQUEUEUP, to_addr.q_flags))
/* restore state */
CurEnv = CurEnv->e_parent;
/* restore state */
CurEnv = CurEnv->e_parent;
-** ERRHEADER -- Output the header for error mail.
-**
-** Parameters:
-** xfile -- the transcript file.
-** fp -- the output file.
-**
-** Returns:
-** none
-**
-** Side Effects:
-** Outputs the header for an error message.
-*/
-
-errheader(fp, m)
- register FILE *fp;
- register struct mailer *m;
-{
- /*
- ** Output header of error message.
- */
-
- putheader(fp, m);
-}
-\f/*
** ERRBODY -- output the body of an error message.
**
** Typically this is a copy of the transcript plus a copy of the
** ERRBODY -- output the body of an error message.
**
** Typically this is a copy of the transcript plus a copy of the
{
fprintf(fp, "\n ----- Unsent message follows -----\n");
(void) fflush(fp);
{
fprintf(fp, "\n ----- Unsent message follows -----\n");
(void) fflush(fp);
- putheader(fp, Mailer[1], CurEnv->e_parent);
+ putheader(fp, m, CurEnv->e_parent);
- putbody(fp, Mailer[1], xdot);
}
else
{
fprintf(fp, "\n ----- Message header follows -----\n");
(void) fflush(fp);
}
else
{
fprintf(fp, "\n ----- Message header follows -----\n");
(void) fflush(fp);
- putheader(fp, Mailer[1]);
+ putheader(fp, m, CurEnv);
# include "sendmail.h"
# ifndef SMTP
# include "sendmail.h"
# ifndef SMTP
-SCCSID(@(#)usersmtp.c 3.10 %G% (no SMTP));
+SCCSID(@(#)usersmtp.c 3.11 %G% (no SMTP));
-SCCSID(@(#)usersmtp.c 3.10 %G%);
+SCCSID(@(#)usersmtp.c 3.11 %G%);
/*
** SMTPINIT -- initialize SMTP.
/*
** SMTPINIT -- initialize SMTP.
char buf[100];
(void) sprintf(buf, f, a, b, c);
char buf[100];
(void) sprintf(buf, f, a, b, c);
+ (void) strcat(buf, "\r\n");
if (Debug)
fputs(buf, stdout);
fputs(buf, SmtpOut);
if (Debug)
fputs(buf, stdout);
fputs(buf, SmtpOut);
# include "sendmail.h"
# include "conf.h"
# include "sendmail.h"
# include "conf.h"
-SCCSID(@(#)util.c 3.15 %G%);
+SCCSID(@(#)util.c 3.16 %G%);
/*
** STRIPQUOTES -- Strip quotes & quote bits from a string.
/*
** STRIPQUOTES -- Strip quotes & quote bits from a string.
- register unsigned int sz;
- p = xalloc((unsigned) (strlen(s) + 1));
- strcpy(p, s);
+ p = xalloc(strlen(s) + 1);
+ (void) strcpy(p, s);
- newvp = (char **) xalloc((unsigned) (vp - list) * sizeof *vp);
+ newvp = (char **) xalloc((vp - list) * sizeof *vp);
bmove((char *) list, (char *) newvp, (vp - list) * sizeof *vp);
if (copycont)
bmove((char *) list, (char *) newvp, (vp - list) * sizeof *vp);
if (copycont)
-static char SccsId[] = "@(#)SendMail version 3.110 of %G%";
+static char SccsId[] = "@(#)SendMail version 3.111 of %G%";
-char Version[] = "3.110 [%G%]";
+char Version[] = "3.111 [%G%]";