=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh.c,v retrieving revision 1.420.2.2 retrieving revision 1.421 diff -u -r1.420.2.2 -r1.421 --- src/usr.bin/ssh/ssh.c 2016/01/14 14:48:18 1.420.2.2 +++ src/usr.bin/ssh/ssh.c 2015/09/04 04:56:09 1.421 @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.420.2.2 2016/01/14 14:48:18 sthen Exp $ */ +/* $OpenBSD: ssh.c,v 1.421 2015/09/04 04:56:09 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1150,6 +1150,7 @@ * have yet resolved the hostname. Do so now. */ if (addrs == NULL && options.proxy_command == NULL) { + debug2("resolving \"%s\" port %d", host, options.port); if ((addrs = resolve_host(host, options.port, 1, cname, sizeof(cname))) == NULL) cleanup_exit(255); /* resolve_host logs the error */ @@ -1554,7 +1555,6 @@ struct winsize ws; char *cp; const char *display; - char *proto = NULL, *data = NULL; /* Enable compression if requested. */ if (options.compression) { @@ -1625,9 +1625,13 @@ display = getenv("DISPLAY"); if (display == NULL && options.forward_x11) debug("X11 forwarding requested but DISPLAY not set"); - if (options.forward_x11 && client_x11_get_proto(display, - options.xauth_location, options.forward_x11_trusted, - options.forward_x11_timeout, &proto, &data) == 0) { + if (options.forward_x11 && display != NULL) { + char *proto, *data; + /* Get reasonable local authentication information. */ + client_x11_get_proto(display, options.xauth_location, + options.forward_x11_trusted, + options.forward_x11_timeout, + &proto, &data); /* Request forwarding with authentication spoofing. */ debug("Requesting X11 forwarding with authentication " "spoofing."); @@ -1717,7 +1721,6 @@ extern char **environ; const char *display; int interactive = tty_flag; - char *proto = NULL, *data = NULL; if (!success) return; /* No need for error message, channels code sens one */ @@ -1725,9 +1728,12 @@ display = getenv("DISPLAY"); if (display == NULL && options.forward_x11) debug("X11 forwarding requested but DISPLAY not set"); - if (options.forward_x11 && client_x11_get_proto(display, - options.xauth_location, options.forward_x11_trusted, - options.forward_x11_timeout, &proto, &data) == 0) { + if (options.forward_x11 && display != NULL) { + char *proto, *data; + /* Get reasonable local authentication information. */ + client_x11_get_proto(display, options.xauth_location, + options.forward_x11_trusted, + options.forward_x11_timeout, &proto, &data); /* Request forwarding with authentication spoofing. */ debug("Requesting X11 forwarding with authentication " "spoofing."); @@ -1876,6 +1882,9 @@ } else fork_postauth(); } + + if (options.use_roaming) + request_roaming(); return client_loop(tty_flag, tty_flag ? options.escape_char : SSH_ESCAPECHAR_NONE, id);