Subject: Re: New Sendmail munching root username
To: None <netbsd-help@NetBSD.ORG>
From: Ty Sarna <tsarna@endicor.com>
List: netbsd-help
Date: 09/20/1996 19:04:34
In article <199609201645.JAA26563@netcom21.netcom.com>,
Matthew B. Wood <devtrix@netcom.com> wrote:
> Yes, it's weird. but that's what's happening.
>
> I upgraded to Sendmail 8.7.6 yesterday before the daily system log update
> went through. Now, instead of "Charlie Root" as the addressee, it
> shows up in elm as:
>
> 2 Sep 19 Charlie ????D???@? (69) daily output
>
>
> looking in the actual inbox, I see this:
>
> From: "Charlie ^P0xce0xbf0xf7D0xce0xbf0xf7@0xce0xbf0xf7]0xce0xbf0xf7m0xd0^C" <ro
> ot>
>
> This must be some clash between new Sendmail and the name "Charlie &" in
> the passwd file. But what is it?
See comp.mail.sendmail. There is a bug in 8.7.6 with a use of the
SPACELEFT macro in util.c (line 421 I think, in buildfname()). The macro
takes sizeof a pointer instead of a buffer, and this miscalculates. I
bet this is your problem.
Look for a line like:
snprintf(bp, SPACELEFT(buf, ptr),"%s", login);
And change it to:
snprintf(bp, buflen - (ptr - buf), "%s", login);