From 73f6752ac9671e4ba809253adce625c8c0531090 Mon Sep 17 00:00:00 2001 From: Eric Allman Date: Sat, 1 May 1993 19:26:43 -0800 Subject: [PATCH] minor tweaking of syslog levels & compile fixes for SunOS & Ultrix SCCS-vsn: usr.sbin/sendmail/src/recipient.c 6.39 SCCS-vsn: usr.sbin/sendmail/src/queue.c 6.53 SCCS-vsn: usr.sbin/sendmail/src/alias.c 6.36 SCCS-vsn: usr.sbin/sendmail/src/udb.c 6.18 SCCS-vsn: usr.sbin/sendmail/src/map.c 6.12 --- usr/src/usr.sbin/sendmail/src/alias.c | 11 ++++++----- usr/src/usr.sbin/sendmail/src/map.c | 9 +++++---- usr/src/usr.sbin/sendmail/src/queue.c | 6 +++--- usr/src/usr.sbin/sendmail/src/recipient.c | 10 ++++++---- usr/src/usr.sbin/sendmail/src/udb.c | 9 +++++++-- 5 files changed, 27 insertions(+), 18 deletions(-) diff --git a/usr/src/usr.sbin/sendmail/src/alias.c b/usr/src/usr.sbin/sendmail/src/alias.c index 8b1af9dbe5..f07e73425a 100644 --- a/usr/src/usr.sbin/sendmail/src/alias.c +++ b/usr/src/usr.sbin/sendmail/src/alias.c @@ -15,6 +15,7 @@ ERROR: DBM is no longer supported -- use NDBM instead. # endif # ifdef NEWDB +# undef __P # include # endif @@ -25,15 +26,15 @@ ERROR: DBM is no longer supported -- use NDBM instead. #ifndef lint #ifdef NEWDB #ifdef NDBM -static char sccsid[] = "@(#)alias.c 6.35 (Berkeley) %G% (with NEWDB and NDBM)"; +static char sccsid[] = "@(#)alias.c 6.36 (Berkeley) %G% (with NEWDB and NDBM)"; #else -static char sccsid[] = "@(#)alias.c 6.35 (Berkeley) %G% (with NEWDB)"; +static char sccsid[] = "@(#)alias.c 6.36 (Berkeley) %G% (with NEWDB)"; #endif #else #ifdef NDBM -static char sccsid[] = "@(#)alias.c 6.35 (Berkeley) %G% (with NDBM)"; +static char sccsid[] = "@(#)alias.c 6.36 (Berkeley) %G% (with NDBM)"; #else -static char sccsid[] = "@(#)alias.c 6.35 (Berkeley) %G% (without NEWDB or NDBM)"; +static char sccsid[] = "@(#)alias.c 6.36 (Berkeley) %G% (without NEWDB or NDBM)"; #endif #endif #endif /* not lint */ @@ -959,7 +960,7 @@ forward(user, sendq, e) printf("forward: transient error on %s\n", buf); #ifdef LOG if (LogLevel > 2) - syslog(LOG_NOTICE, "%s: forward %s: transient error: %e", + syslog(LOG_ERR, "%s: forward %s: transient error: %e", e->e_id, buf); #endif message("%s: %s: message queued", buf, errstring(err)); diff --git a/usr/src/usr.sbin/sendmail/src/map.c b/usr/src/usr.sbin/sendmail/src/map.c index a9ca677d18..7ef0f38440 100644 --- a/usr/src/usr.sbin/sendmail/src/map.c +++ b/usr/src/usr.sbin/sendmail/src/map.c @@ -7,7 +7,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)map.c 6.11 (Berkeley) %G%"; +static char sccsid[] = "@(#)map.c 6.12 (Berkeley) %G%"; #endif /* not lint */ #include "sendmail.h" @@ -16,6 +16,7 @@ static char sccsid[] = "@(#)map.c 6.11 (Berkeley) %G%"; #include #endif #if defined(HASH_MAP) || defined(BTREE_MAP) +#undef __P #include #endif #ifdef NIS_MAP @@ -106,9 +107,9 @@ dbm_map_lookup(map, buf, bufsiz, av, statp) } if (bitset(MF_INCLNULL, map->map_flags)) key.dsize++; - (void) lockfile(dbm_dirfno(map->map_db), map->map_file, LOCK_SH); - val = dbm_fetch(map->map_db, key); - (void) lockfile(dbm_dirfno(map->map_db), map->map_file, LOCK_UN); + (void) lockfile(dbm_dirfno((DBM *) map->map_db), map->map_file, LOCK_SH); + val = dbm_fetch((DBM *) map->map_db, key); + (void) lockfile(dbm_dirfno((DBM *) map->map_db), map->map_file, LOCK_UN); if (val.dptr == NULL) return NULL; if (!bitset(MF_MATCHONLY, map->map_flags)) diff --git a/usr/src/usr.sbin/sendmail/src/queue.c b/usr/src/usr.sbin/sendmail/src/queue.c index cb07dd845f..e11f23625c 100644 --- a/usr/src/usr.sbin/sendmail/src/queue.c +++ b/usr/src/usr.sbin/sendmail/src/queue.c @@ -10,9 +10,9 @@ #ifndef lint #ifdef QUEUE -static char sccsid[] = "@(#)queue.c 6.52 (Berkeley) %G% (with queueing)"; +static char sccsid[] = "@(#)queue.c 6.53 (Berkeley) %G% (with queueing)"; #else -static char sccsid[] = "@(#)queue.c 6.52 (Berkeley) %G% (without queueing)"; +static char sccsid[] = "@(#)queue.c 6.53 (Berkeley) %G% (without queueing)"; #endif #endif /* not lint */ @@ -615,7 +615,7 @@ orderq(doall) printf("orderq: bogus qf name %s\n", d->d_name); #ifdef LOG if (LogLevel > 3) - syslog(LOG_NOTICE, "orderq: bogus qf name %s", + syslog(LOG_CRIT, "orderq: bogus qf name %s", d->d_name); #endif if (strlen(d->d_name) >= MAXNAME) diff --git a/usr/src/usr.sbin/sendmail/src/recipient.c b/usr/src/usr.sbin/sendmail/src/recipient.c index f542050970..8f24be9306 100644 --- a/usr/src/usr.sbin/sendmail/src/recipient.c +++ b/usr/src/usr.sbin/sendmail/src/recipient.c @@ -7,7 +7,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)recipient.c 6.38 (Berkeley) %G%"; +static char sccsid[] = "@(#)recipient.c 6.39 (Berkeley) %G%"; #endif /* not lint */ # include "sendmail.h" @@ -327,7 +327,7 @@ recipient(a, sendq, e) { #ifdef LOG if (LogLevel > 2) - syslog(LOG_NOTICE, "%s: include %s: transient error: %e", + syslog(LOG_ERR, "%s: include %s: transient error: %e", e->e_id, a->q_user); #endif a->q_flags |= QQUEUEUP|QDONTSEND; @@ -377,6 +377,7 @@ recipient(a, sendq, e) if (!bitset(QDONTSEND|QNOTREMOTE|QVERIFIED, a->q_flags)) { extern int udbexpand(); + extern int errno; if (udbexpand(a, sendq, e) == EX_TEMPFAIL) { @@ -385,10 +386,11 @@ recipient(a, sendq, e) e->e_message = newstr("Deferred: user database error"); # ifdef LOG if (LogLevel > 8) - syslog(LOG_INFO, "%s: deferred: udbexpand", + syslog(LOG_INFO, "%s: deferred: udbexpand: %e", e->e_id); # endif - message("queued (user database error)"); + message("queued (user database error): %s", + errstring(errno)); e->e_nrcpts++; return (a); } diff --git a/usr/src/usr.sbin/sendmail/src/udb.c b/usr/src/usr.sbin/sendmail/src/udb.c index 680f3d8a75..1bcd9e358b 100644 --- a/usr/src/usr.sbin/sendmail/src/udb.c +++ b/usr/src/usr.sbin/sendmail/src/udb.c @@ -8,9 +8,9 @@ #ifndef lint #ifdef USERDB -static char sccsid [] = "@(#)udb.c 6.17 (Berkeley) %G% (with USERDB)"; +static char sccsid [] = "@(#)udb.c 6.18 (Berkeley) %G% (with USERDB)"; #else -static char sccsid [] = "@(#)udb.c 6.17 (Berkeley) %G% (without USERDB)"; +static char sccsid [] = "@(#)udb.c 6.18 (Berkeley) %G% (without USERDB)"; #endif #endif @@ -561,6 +561,11 @@ _udbx_init() { if (errno != ENOENT && errno != EACCES) { +#ifdef LOG + if (LogLevel > 2) + syslog(LOG_ERR, "dbopen(%s): %e", + spec); +#endif up->udb_type = UDB_EOLIST; goto tempfail; } -- 2.20.1