From cf7a936d75bd5edcc7147f76c1b5e42df4ae17d1 Mon Sep 17 00:00:00 2001 From: Eric Allman Date: Sun, 15 Aug 1993 02:14:30 -0800 Subject: [PATCH] add TimeOuts.to_ident to set IDENT protocol timeout SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 8.12 SCCS-vsn: usr.sbin/sendmail/src/daemon.c 8.7 SCCS-vsn: usr.sbin/sendmail/src/readcf.c 8.9 --- usr/src/usr.sbin/sendmail/src/daemon.c | 6 +++--- usr/src/usr.sbin/sendmail/src/readcf.c | 6 +++++- usr/src/usr.sbin/sendmail/src/sendmail.h | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/usr/src/usr.sbin/sendmail/src/daemon.c b/usr/src/usr.sbin/sendmail/src/daemon.c index b7712cc7ac..6c9fec9f49 100644 --- a/usr/src/usr.sbin/sendmail/src/daemon.c +++ b/usr/src/usr.sbin/sendmail/src/daemon.c @@ -12,9 +12,9 @@ #ifndef lint #ifdef DAEMON -static char sccsid[] = "@(#)daemon.c 8.6 (Berkeley) %G% (with daemon mode)"; +static char sccsid[] = "@(#)daemon.c 8.7 (Berkeley) %G% (with daemon mode)"; #else -static char sccsid[] = "@(#)daemon.c 8.6 (Berkeley) %G% (without daemon mode)"; +static char sccsid[] = "@(#)daemon.c 8.7 (Berkeley) %G% (without daemon mode)"; #endif #endif /* not lint */ @@ -592,7 +592,7 @@ getauthinfo(fd) } /* put a timeout around the whole thing */ - ev = setevent((time_t) 30, authtimeout, 0); + ev = setevent(TimeOuts.to_ident, authtimeout, 0); /* connect to foreign IDENT server */ s = socket(AF_INET, SOCK_STREAM, 0); diff --git a/usr/src/usr.sbin/sendmail/src/readcf.c b/usr/src/usr.sbin/sendmail/src/readcf.c index ca27ae34e4..f80481501f 100644 --- a/usr/src/usr.sbin/sendmail/src/readcf.c +++ b/usr/src/usr.sbin/sendmail/src/readcf.c @@ -7,7 +7,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)readcf.c 8.8 (Berkeley) %G%"; +static char sccsid[] = "@(#)readcf.c 8.9 (Berkeley) %G%"; #endif /* not lint */ # include "sendmail.h" @@ -1572,6 +1572,7 @@ makemapentry(line) ** Initializes the TimeOuts structure */ +#define SECONDS #define MINUTES * 60 #define HOUR * 3600 @@ -1594,6 +1595,7 @@ settimeouts(val) TimeOuts.to_quit = (time_t) 2 MINUTES; TimeOuts.to_nextcommand = (time_t) 1 HOUR; TimeOuts.to_miscshort = (time_t) 2 MINUTES; + TimeOuts.to_ident = (time_t) 30 SECONDS; return; } @@ -1654,6 +1656,8 @@ settimeouts(val) TimeOuts.to_quit = to; else if (strcasecmp(val, "misc") == 0) TimeOuts.to_miscshort = to; + else if (strcasecmp(val, "ident") == 0) + TimeOuts.to_ident = to; else syserr("settimeouts: invalid timeout %s", val); } diff --git a/usr/src/usr.sbin/sendmail/src/sendmail.h b/usr/src/usr.sbin/sendmail/src/sendmail.h index 6164e51dfb..e85e77a517 100644 --- a/usr/src/usr.sbin/sendmail/src/sendmail.h +++ b/usr/src/usr.sbin/sendmail/src/sendmail.h @@ -5,7 +5,7 @@ * * %sccs.include.redist.c% * - * @(#)sendmail.h 8.11 (Berkeley) %G% + * @(#)sendmail.h 8.12 (Berkeley) %G% */ /* @@ -15,7 +15,7 @@ # ifdef _DEFINE # define EXTERN # ifndef lint -static char SmailSccsId[] = "@(#)sendmail.h 8.11 %G%"; +static char SmailSccsId[] = "@(#)sendmail.h 8.12 %G%"; # endif # else /* _DEFINE */ # define EXTERN extern @@ -816,6 +816,7 @@ EXTERN FILE *TrafficLogFile; /* file in which to log all traffic */ EXTERN struct { + /* RFC 1123-specified timeouts [minimum value] */ time_t to_initial; /* initial greeting timeout [5m] */ time_t to_mail; /* MAIL command [5m] */ time_t to_rcpt; /* RCPT command [5m] */ @@ -828,6 +829,7 @@ EXTERN struct time_t to_helo; /* HELO command */ time_t to_quit; /* QUIT command */ time_t to_miscshort; /* misc short commands (NOOP, VERB, etc) */ + time_t to_ident; /* IDENT protocol requests */ /* following are per message */ time_t to_q_return; /* queue return timeout */ time_t to_q_warning; /* queue warning timeout */ -- 2.20.1