[9389] in Athena Bugs
Re: rlogin (.ucb), DECstations
daemon@ATHENA.MIT.EDU (Ezra Peisach)
Tue Jun 2 18:47:21 1992
To: solo26@Athena.MIT.EDU
Cc: bugs@Athena.MIT.EDU, testers@Athena.MIT.EDU
In-Reply-To: Your message of Tue, 02 Jun 92 16:57:36 -0400.
Date: Tue, 02 Jun 92 18:47:06 EDT
From: Ezra Peisach <epeisach@Athena.MIT.EDU>
Here is the required fix....
Problem:
a) struct passwd has the pw_name field as a char *.
b) At various places in the code, nouser may be specified as the pwd
structure. It initializes pw_name = "";
c) Line 558 we see the following;
strncpy(pwd->pw_name, utmp.ut_name, NMAX);
utmp.ut_name is setup properly in doremotelogin and will be more than
one character long.
Solution:
Allocate the space that is necessary.... (I left 9 spaces, but 8 will do
nicely).
RCS file: RCS/login.c,v
retrieving revision 1.1
diff -r1.1 login.c
135c135
< struct passwd nouser = {"", /* name */
---
> struct passwd nouser = {" ", /* name */