Subject: Re: CVS commit: basesrc
To: None <thorpej@zembu.com>
From: Perry E. Metzger <perry@wasabisystems.com>
List: source-changes
Date: 06/18/2001 20:31:31
Jason R Thorpe <thorpej@zembu.com> writes:

> On Tue, Jun 19, 2001 at 09:55:19AM +1000, Luke Mewburn wrote:
> 
>  > Have a look at the way that X11Forwarding is implemented. It effectively
>  > comprises of:
>  > 	* creating a tunnel for the X traffic (ssh & sshd)
>  > 	* creating a one-time $DISPLAY (e.g, "server:55") and and
>  > 	  appropriate xauth cookie for that session (ssh)
>  > 	* passing this new $DISPLAY and cookie (ssh to remote sshd to deal with)
>  > 
>  > Our login(1) can't handle the cookie (or the DISPLAY, unless it's in the
>  > environment before-hand). Hacking login(1) to support this cookie
>  > munging is something that I strongly object to.
> 
> The bug is that OpenSSH has REALLY CRAPPY child environment variable
> handling.

Seems fine to me. Have a look:

----------------------------------------------------------------------
perry@foo$ slogin bar
Last login: Mon Jun 18 20:12:33 2001 from 3ffe:1ce1:0:fe12
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001
        The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.

NetBSD 1.5U (BAR) #0: Sun Apr 8 17:35:23 EDT 2001

Welcome to NetBSD!

You have new mail.
perry@bar$ echo $DISPLAY
bar:10.0
perry@bar$ echo $XAUTHORITY
/tmp/ssh-015886aa/cookies
perry@bar$ ls -l /tmp/ssh-015886aa/cookies
-rw-------  1 perry  wheel  0 Jun 18 20:28 /tmp/ssh-015886aa/cookies
----------------------------------------------------------------------

The problem isn't the environment variables. It is that the xauthority
file it creates is empty.

--
Perry E. Metzger		perry@wasabisystems.com
--
Quality NetBSD CDs, Support & Service. http://www.wasabisystems.com/