Subject: Re: Sendmail: extraneous duplicate detection
To: Havard Eidnes <Havard.Eidnes@runit.sintef.no>
From: Eric Allman <eric@CS.Berkeley.EDU>
List: netbsd-bugs
Date: 12/11/1993 17:11:21
Hmmm...... I thought I had fixed this with the uid check, but I
obviously botched it. However, your fix has some other problems.
I suggest the following patch instead:
*** /tmp/d15547 Sat Dec 11 17:08:56 1993
--- parseaddr.c Sat Dec 11 17:08:23 1993
***************
*** 1490,1495 ****
--- 1490,1497 ----
register ADDRESS *a;
register ADDRESS *b;
{
+ register ADDRESS *ca, *cb;
+
/* if they don't have the same mailer, forget it */
if (a->q_mailer != b->q_mailer)
return (FALSE);
***************
*** 1498,1505 ****
if (strcmp(a->q_user, b->q_user) != 0)
return (FALSE);
! /* if we have good uids for both but the differ, these are different */
! if (bitset(QGOODUID, a->q_flags & b->q_flags) && a->q_uid != b->q_uid)
return (FALSE);
/* otherwise compare hosts (but be careful for NULL ptrs) */
--- 1500,1510 ----
if (strcmp(a->q_user, b->q_user) != 0)
return (FALSE);
! /* if we have good uids for both but they differ, these are different */
! ca = getctladdr(a);
! cb = getctladdr(b);
! if (bitset(QGOODUID, ca->q_flags & cb->q_flags) &&
! ca->q_uid != cb->q_uid)
return (FALSE);
/* otherwise compare hosts (but be careful for NULL ptrs) */
eric
Re:
: From: Havard Eidnes <Havard.Eidnes@runit.sintef.no>
: Subject: Sendmail: extraneous duplicate detection
: Date: Sun, 12 Dec 1993 01:10:37 +0100
: Hi,
:
: I think we have found a bug in sendmail having to do with detection and
: removal of duplicate mail addresses during eg. list expansion and/or
: delivery. One example of when the error occurs is if you have a local
: mailing list with two members, and they each have identical .forward files
: specifying the same program, eg.
:
: "|/local/bin/slocal"
:
: slocal detects what user it runs as, and does "the right thing". However,
: in the above case with the mailing list, sendmail refuses to deliver to
: more than one user having such a .forward file. I think this is a bug, and
: the attached diff seems to fix it sufficiently well. This is apparently
: also a long-standing bug in sendmail, as the same problem exists in IDA
: sendmail version 5.67b and also probably older variants as well.
:
: This is with sendmail 8.6.4.
:
:
: - Havard
:
: PS. while we were at it we fixed a small typo :-)
:
:
: *** 1.1 1993/12/11 23:23:23
: --- parseaddr.c 1993/12/11 23:33:35
: ***************
: *** 1509,1514 ****
: return (FALSE);
:
: ! /* if we have good uids for both but the differ, these are different */
: if (bitset(QGOODUID, a->q_flags & b->q_flags) && a->q_uid != b->q_uid)
: return (FALSE);
:
: --- 1509,1519 ----
: return (FALSE);
:
: ! /* if we have good uids for both but they differ, these are different *
/
: if (bitset(QGOODUID, a->q_flags & b->q_flags) && a->q_uid != b->q_uid)
: + return (FALSE);
: +
: + /* Be careful about prog mailers, only same if same user name and/or sa
me command (and possibly not even then) */
: + /* But we can't really test for "same user name" here, as it's "|", so
we punt. */
: + if (a->q_mailer == ProgMailer)
: return (FALSE);
------------------------------------------------------------------------------