summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2015-04-17 13:16:48 +0000
committerDamien Miller <djm@mindrot.org>2015-04-29 18:13:35 +1000
commita58be33cb6cd24441fa7e634db0e5babdd56f07f (patch)
treeee430b42e607f89f1ad9a64a4ff68503390b5391
parent17d4d9d9fbc8fb80e322f94d95eecc604588a474 (diff)
upstream commit
debug log missing DISPLAY environment when X11 forwarding requested; bz#1682 ok dtucker@
-rw-r--r--ssh.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ssh.c b/ssh.c
index 0ad82f029..ae4092544 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.416 2015/03/03 06:48:58 djm Exp $ */ 1/* $OpenBSD: ssh.c,v 1.417 2015/04/17 13:16:48 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1673,6 +1673,8 @@ ssh_session(void)
1673 } 1673 }
1674 /* Request X11 forwarding if enabled and DISPLAY is set. */ 1674 /* Request X11 forwarding if enabled and DISPLAY is set. */
1675 display = getenv("DISPLAY"); 1675 display = getenv("DISPLAY");
1676 if (display == NULL && options.forward_x11)
1677 debug("X11 forwarding requested but DISPLAY not set");
1676 if (options.forward_x11 && display != NULL) { 1678 if (options.forward_x11 && display != NULL) {
1677 char *proto, *data; 1679 char *proto, *data;
1678 /* Get reasonable local authentication information. */ 1680 /* Get reasonable local authentication information. */
@@ -1774,6 +1776,8 @@ ssh_session2_setup(int id, int success, void *arg)
1774 return; /* No need for error message, channels code sens one */ 1776 return; /* No need for error message, channels code sens one */
1775 1777
1776 display = getenv("DISPLAY"); 1778 display = getenv("DISPLAY");
1779 if (display == NULL && options.forward_x11)
1780 debug("X11 forwarding requested but DISPLAY not set");
1777 if (options.forward_x11 && display != NULL) { 1781 if (options.forward_x11 && display != NULL) {
1778 char *proto, *data; 1782 char *proto, *data;
1779 /* Get reasonable local authentication information. */ 1783 /* Get reasonable local authentication information. */