=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/mux.c,v retrieving revision 1.50 retrieving revision 1.50.2.1 diff -u -r1.50 -r1.50.2.1 --- src/usr.bin/ssh/mux.c 2015/01/20 23:14:00 1.50 +++ src/usr.bin/ssh/mux.c 2016/01/14 11:53:20 1.50.2.1 @@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.50 2015/01/20 23:14:00 deraadt Exp $ */ +/* $OpenBSD: mux.c,v 1.50.2.1 2016/01/14 11:53:20 sthen Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller * @@ -1324,16 +1324,18 @@ char *proto, *data; /* Get reasonable local authentication information. */ - client_x11_get_proto(display, options.xauth_location, + if (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."); - x11_request_forwarding_with_spoofing(id, display, proto, - data, 1); - client_expect_confirm(id, "X11 forwarding", CONFIRM_WARN); - /* XXX exit_on_forward_failure */ + &proto, &data) == 0) { + /* Request forwarding with authentication spoofing. */ + debug("Requesting X11 forwarding with authentication " + "spoofing."); + x11_request_forwarding_with_spoofing(id, display, proto, + data, 1); + /* XXX exit_on_forward_failure */ + client_expect_confirm(id, "X11 forwarding", + CONFIRM_WARN); + } } if (cctx->want_agent_fwd && options.forward_agent) {