*** SERIOUS BUG IN SVR3 (with fix) ***

Stephen J. Friedl friedl at vsi.UUCP
Thu May 19 15:11:13 AEST 1988


Hi net.folks,

     We've just tracked down a really ugly bug in SVR3 for the
3B2 that can prevent init from working properly.  We present this
in the hopes that you don't get burned like we did.

     SUMMARY OF BUG (you're not going to believe this):
commented lines in /etc/TIMEZONE that contain equal signs will
cause the system to fail to enter multiuser mode.

     FIX: delete the lines or remove the equal signs.

     BACKGROUND: Recall that init(1m) reads /etc/TIMEZONE to grab
up to five environment variables (TZ, usually) and puts them in
the environment for all its children.  Because init appears to
take *any* lines that contain an = sign without respect to
comments, a bogus variable assignment could be made that /bin/sh
will not accept.  This will cause the shell to exit and not run
anything out of inittab.

     A customer was upgrading from 2.0.4 to 3.1, and his
/etc/TIMEZONE file had the following in it:

        # set the timezone
        <TAB>   TZ=PST8PDT
        #<TAB>  TZ=PST7PDT

     Init runs all its commands with:

        /bin/sh -c "exec COMMAND"

and it appeared that each command was failing immediately.  We
put a front-end onto /bin/sh to attach stdin+out+err to
/dev/console (normally it's not connected to anything when run
from init) so we could see the error message, and it said
something like:

        sh: "#^ITZ=PST7PDT": not an identifier

     Obviously, init was picking this up from /etc/TIMEZONE.
Deleting the line from the file fixed the problem and allowed
everything to run.

     Note that we have not done extensive research on this, and
our assumptions on the equal sign being significant are just
guesses (we just deleted the line to fix the problem).
Nevertheless, this looks like a pretty easy fix for some kind
soul at AT&T to do...

     Anybody else seen this?

     Steve

-- 
Steve Friedl    V-Systems, Inc. (714) 545-6442    3B2-kind-of-guy
friedl at vsi.com    {backbones}!vsi.com!friedl   attmail!vsi!friedl



More information about the Comp.sys.att mailing list