[net.bugs.4bsd] Bug in "/usr/lib/sendmail" in Sun UNIX release 2.0.

stephen@dcl-cs.UUCP (Stephen J. Muir) (10/10/85)

If you are running the above mentioned system then do *not* use the "-bz" flag
of "/usr/lib/sendmail" and ensure that the file "/usr/lib/sendmail.fc" doesn't
exist.  Otherwise, the wrong bits of "/usr/lib/sendmail" may be overwritten on
execution causing strange behaviour.
-- 
UUCP:	...!seismo!mcvax!ukc!dcl-cs!stephen
DARPA:	stephen%lancs.comp@ucl-cs	| Post: University of Lancaster,
JANET:	stephen@uk.ac.lancs.comp	|	Department of Computing,
Phone:	+44 524 65201 Ext. 4599		|	Bailrigg, Lancaster, UK.
Project:Alvey ECLIPSE Distribution	|	LA1 4YR

stephen@dcl-cs.UUCP (Stephen J. Muir) (10/15/85)

In article <669@dcl-cs.UUCP> I wrote:
>If you are running the above mentioned system then do *not* use the "-bz" flag
>of "/usr/lib/sendmail" and ensure that the file "/usr/lib/sendmail.fc" doesn't
>exist.  Otherwise, the wrong bits of "/usr/lib/sendmail" may be overwritten on
>execution causing strange behaviour.

I've been asked to clarify this.  What I meant is that "/usr/lib/sendmail",
when it runs, overwrites itself in an erroneous way when it pulls in the
"sendmail.fc" file.  This has been reported to SUN microsystems.

I agree that freezing the configuration file is the best way but,
unfortunately, this bug may cause unpredictable things to happen.  It may seem
to work for *you* but "sendmail" may do the wrong thing at some stage depending
what the exact contents of your configuration file are.

The effect of this bug, in my case, was that sendmail closed the ethernet
connection immediately it was established (without even printing the
introductory message).  You may find that nothing *seems* to go wrong or that
something else goes wrong.  In any case, it's unsafe.

I have demonstrated this to be a bug to SUN microsystems and it is being
investigated.
-- 
UUCP:	...!seismo!mcvax!ukc!dcl-cs!stephen
DARPA:	stephen%lancs.comp@ucl-cs	| Post: University of Lancaster,
JANET:	stephen@uk.ac.lancs.comp	|	Department of Computing,
Phone:	+44 524 65201 Ext. 4599		|	Bailrigg, Lancaster, UK.
Project:Alvey ECLIPSE Distribution	|	LA1 4YR

stephen@dcl-cs.UUCP (Stephen J. Muir) (10/15/85)

It has been pointed out to me that swapping the bytes in "/usr/lib/sendmail.fc"
overcomes the problem.  I don't know why, but there you are (Harry Worth).
-- 
UUCP:	...!seismo!mcvax!ukc!dcl-cs!stephen
DARPA:	stephen%lancs.comp@ucl-cs	| Post: University of Lancaster,
JANET:	stephen@uk.ac.lancs.comp	|	Department of Computing,
Phone:	+44 524 65201 Ext. 4599		|	Bailrigg, Lancaster, UK.
Project:Alvey ECLIPSE Distribution	|	LA1 4YR

gnu@l5.uucp (John Gilmore) (10/19/85)

It is definitely true that sendmail in Sun Unix 2.0 cannot successfully
use a frozen config file.  The Sun-supplied /etc/rc and such do not use
that feature; it only happens if you mess around and try it.  I
originally ported sendmail to the Sun from 4.1c BSD.  I tried to freeze
a config; it didn't work, it wasn't vital, and I went on to other
things.  When Bill Nowicki took over sendmail work, it was the first
thing he fixed.  My dim recollection was that it was something about a
few variables being declared initialized (thus in the data segment
rather than in bss) and they didn't get dumped in the kludgey freeze
file, which is a copy of sendmail's BSS region.  I believe the fix is
in the sendmail to be released with Sun Unix 3.0.  Berkeley probably
bought back the fix for 4.3 also.

In the meantime, the solution is simple:  don't freeze your
config file.  Remove any /usr/lib/sendmail.fc and it will work fine.

brian@sdcsvax.UUCP (Brian Kantor) (10/20/85)

We too had the Sun 2.0 frozen configuration sendmail problem, evinced by a 
receiving sun instantly closing the TCP connection.  Because most of our
Sun workstations are short on memory (1 meg) and therefore slow, I
wanted to use the frozen configuration file.  It turns out that, in our
cluster of suns anyway, the sendmail that was on the Sun 1.[0-4] system
seems to work just fine with the frozen configuration file.

How to tell if a sun you're having problems with is running the new or
the old sun sendmail version:

	1. Kill the /usr/lib/sendmail.fc file on the questioned machine.
	2. From another sendmail-equipped system, send it mail with the
	   -v (verbose) flag on, and watch the conversation.

If the DATA message is greeted with
	354 Lay it on me, baby!
you have the newer version of sendmail running on the destination sun.
Older versions said something much more boring.

Something to keep in mind: sendmail stores the host name in the frozen
configuration.  If you have the .fc file in a NFS shared file system,
and freeze it (sendmail -bz) on the server, all the clients will report
their hostname in mail as being the server.  You may actually want this
to happen, although I don't think that's really the right way to do it.

	Brian Kantor	UC San Diego

	decvax\ 	brian@ucsd.arpa
	akgua  >---  sdcsvax  --- brian
	ucbvax/		Kantor@Nosc