summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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. */