From f2a0b0fbdfaab79400df65d1d67a7907cd444fcd Mon Sep 17 00:00:00 2001 From: glass Date: Tue, 20 Jul 1993 18:10:14 +0000 Subject: Upgraded sendmail from revision 8.1C to 8.3; this version of sendmail tries to use sysconf() if the _SC_* macros are defined in unistd.h. We have the macros but not the function. A temporary "fix" has been made to avoid the issue. --- usr.sbin/sendmail/src/queue.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'usr.sbin/sendmail/src/queue.c') diff --git a/usr.sbin/sendmail/src/queue.c b/usr.sbin/sendmail/src/queue.c index c9cd073c248..5b55217774e 100644 --- a/usr.sbin/sendmail/src/queue.c +++ b/usr.sbin/sendmail/src/queue.c @@ -36,9 +36,9 @@ #ifndef lint #ifdef QUEUE -static char sccsid[] = "@(#)queue.c 8.1 (Berkeley) 6/7/93 (with queueing)"; +static char sccsid[] = "@(#)queue.c 8.3 (Berkeley) 7/13/93 (with queueing)"; #else -static char sccsid[] = "@(#)queue.c 8.1 (Berkeley) 6/7/93 (without queueing)"; +static char sccsid[] = "@(#)queue.c 8.3 (Berkeley) 7/13/93 (without queueing)"; #endif #endif /* not lint */ @@ -287,12 +287,17 @@ notemp: else if (bitset(H_FROM|H_RCPT, h->h_flags)) { bool oldstyle = bitset(EF_OLDSTYLE, e->e_flags); + FILE *savetrace = TrafficLogFile; + + TrafficLogFile = NULL; if (bitset(H_FROM, h->h_flags)) oldstyle = FALSE; commaize(h, h->h_value, tfp, oldstyle, &nullmailer, e); + + TrafficLogFile = savetrace; } else fprintf(tfp, "%s: %s\n", h->h_field, h->h_value); @@ -936,6 +941,7 @@ readqf(e) if (tTd(40, 8)) printf("readqf(%s): bogus file\n", qf); fclose(qfp); + rename(qf, queuename(e, 'Q')); return FALSE; } @@ -1056,7 +1062,9 @@ readqf(e) default: syserr("readqf: bad line \"%s\"", e->e_id, LineNumber, bp); - break; + fclose(qfp); + rename(qf, queuename(e, 'Q')); + return FALSE; } if (bp != buf) @@ -1101,7 +1109,7 @@ printqueue() ** Check for permission to print the queue */ - if (bitset(PRIV_RESTRMAILQ, PrivacyFlags) && getuid() != 0) + if (bitset(PRIV_RESTRMAILQ, PrivacyFlags) && RealUid != 0) { struct stat st; # ifdef NGROUPS @@ -1123,7 +1131,7 @@ printqueue() } if (n < 0) # else - if (getgid() != st.st_gid) + if (RealGid != st.st_gid) # endif { usrerr("510 You are not permitted to see the queue"); -- cgit