Tru64 UNIX SIA in 2.5.2p1 is hosed (still)

Gert Doering gert at greenie.muc.de
Thu Mar 22 09:44:46 EST 2001


Hi,

On Wed, Mar 21, 2001 at 04:12:47PM +1100, Damien Miller wrote:
> I am pretty sure it fixes AIX as well, but the manpage that Gert sent to
> the list was a little ambiguous - only saying that TTY should be "null"
> in the cases where no tty is present. Perhaps an AIX guru could enlighten
> us here?

I'll test that again on Friday.

As far as I can see, if we have no TTY, it's legal to put "TTY=\0" in
there - this is what I get if I print out the "UsrInfo" stuff when
doing an "rsh targetmachine":

gd at hostA:/home/gd> rsh localhost ./ui
UsrInfo (27 bytes)...
NAME=root
TTY=
LOGNAME=gd

Actually, I have *no* idea why "NAME=root" is in there - when I do a
normal rlogin/telnet, it looks like this (for both):

gd at hostA:/home/gd> ./ui
UsrInfo (35 bytes)...
LOGNAME=gd
NAME=gd
TTY=/dev/pts/1

-> so what we do should be fine.

>  			cp = xmalloc(22 + strlen(s->tty) +
>  			    2 * strlen(pw->pw_name));
>  			i = sprintf(cp, "LOGNAME=%s%cNAME=%s%cTTY=%s%c%c",
> -			    pw->pw_name, 0, pw->pw_name, 0, s->tty, 0,0);
> +			    pw->pw_name, 0, pw->pw_name, 0,
> +			    s->ttyfd == -1 ? "" : s->tty, 0,0);

What I'm not sure here: what will strlen(s->tty) be if s->ttyfd is -1?  

Will it be "crash" or just "something > 0" (which would be fine)?

gert

-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert at greenie.muc.de
fax: +49-89-35655025                        gert.doering at physik.tu-muenchen.de





More information about the openssh-unix-dev mailing list