[comp.os.minix] bug in login.c

edwin@ruuinf.UUCP (Edwin Kremer) (01/03/89)

Hello, a happy newyear to all of you out there....

I bought MINIX for the Atari-ST some time ago and noticed login.c
not setting the HOME environment variable at all (which reminds me of
one of those very old fortune cookies "You can't go home unless you
set $HOME").

The bug is in the 'strcpy' just before execing the shell; the correct
synopsis for strcpy is 'strcpy(dest, source)' NOT 'strcpy(source,dest)' !!
Well, just exchange both arguments to strcpy and everything is just fine.

							--[ Edwin ]--

-- 
Edwin Kremer, Department of Computer Science, University of Utrecht
Padualaan 14,  P.O. Box 80.089,  3508 TB  Utrecht,  The Netherlands
Phone: +31-30-534104            |    UUCP  : ...!hp4nl!ruuinf!edwin
    "I speak for myself...."    |    Future: edwin@cs.ruu.nl

poole@forty2.UUCP (Simon Poole) (01/10/89)

In article <947@ruuinf.UUCP> edwin@ruuinf.UUCP (Edwin Kremer) writes:
>Hello, a happy newyear to all of you out there....
>
>I bought MINIX for the Atari-ST some time ago and noticed login.c
>not setting the HOME environment variable at all (which reminds me of
>one of those very old fortune cookies "You can't go home unless you
>set $HOME").

The PC 1.3 login works just fine, if you fix the bug in the function
that makes /usr/adm/wtmp entries (has two int's as parameters instead
of char *'s, the 1.3 init has the same problem).

 -- 
----------------------------------------------------------------------------
UUCP:   ...mcvax!cernvax!forty2!poole			Simon Poole
BITNET: K538915@CZHRZU1A
----------------------------------------------------------------------------

leo@marco.UUCP (Matthias Pfaller) (02/13/90)

In line 173 of login.c the declarations of tty and name are missing.
change from
>	wtmp(tty, name)
to
<	wtmp(tty, name)
<	char *tty, *name;
and login will correctly update /usr/adm/wtmp.

		leo@marco.UUCP (Matthias Pfaller)