[Bug 338] X11 forwarding no longer works after upgrading from 2.9.9p2 to 3.4p1
Kevin Steves
kevin at atomicgears.com
Fri Jul 12 07:41:56 EST 2002
> ------- Additional Comments From jrj at purdue.edu 2002-07-11 05:50 -------
> I figured out the problem.
cool, thanks!
> The real culprit is, of all things, the version of bash that Sun now
> releases. The ./configure script tries to find a "good" shell to use.
> On one of my machines (2.6) I had stupidly created a /bin/bash symlink
> and it found that ahead of /bin/ksh. On one of my Solaris 8 machines it
> found the Sun version. On all the others I had forced ./configure to use
> /bin/ksh or it found it first on its own. Those mismatches, of course,
> led to all sorts of confusion as it appeared to me xauth was running OK.
>
> In either case, bash is not capable of finding xauth properly with the
> code that's in ./configure. I added some debugging code and it does
> something like this:
>
> Looking for /bin/xauth
> Looking for /usr/bin/xauth
> Looking for /usr/local/bin/xauth
> ...
> Looking for /usr/openwin/bin:/bin:/usr/bin:/usr/local/bin:.../xauth
>
> It's clearly having trouble breaking $PATH apart, and, as luck would
> have it, the problem is with the last element, which is where it puts
> /usr/openwin/bin to look for xauth. Sigh.
that's a known problem with using autoconf 2.53. can someone bugzilla
that? is it a bash problem or autoconf?
> I tried to add some code to ssh.c to detect when xauth was missing,
> which might have speeded up diagnosing this, but it got more complicated
> than I wanted to spend time on.
>
> You don't appear to have a text file documenting OS specific issues, but I
> suggest a note someplace warning Solaris builders to stay away from bash.
perhaps something like this?
Index: ssh.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/ssh.c,v
retrieving revision 1.181
diff -u -r1.181 ssh.c
--- ssh.c 3 Jul 2002 14:21:05 -0000 1.181
+++ ssh.c 11 Jul 2002 21:37:07 -0000
@@ -710,11 +710,16 @@
FILE *f;
int got_data = 0, i;
char *display;
+ struct stat st;
*_proto = proto;
*_data = data;
proto[0] = data[0] = '\0';
- if (options.xauth_location && (display = getenv("DISPLAY"))) {
+ if (!options.xauth_location ||
+ (stat(options.xauth_location, &st) == -1)) {
+ debug("No xauth program.");
+ } else {
+ display = getenv("DISPLAY");
/* Try to get Xauthority information for the display. */
if (strncmp(display, "localhost:", 10) == 0)
/*
@@ -748,6 +753,7 @@
if (!got_data) {
u_int32_t rand = 0;
+ log("Warning: No xauth data; using fake authentication data for X11 forwarding.");
strlcpy(proto, "MIT-MAGIC-COOKIE-1", sizeof proto);
for (i = 0; i < 16; i++) {
if (i % 4 == 0)
More information about the openssh-unix-dev
mailing list