summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-09-19 11:47:55 +1000
committerDamien Miller <djm@mindrot.org>2002-09-19 11:47:55 +1000
commitf37e246f858cdd79be4f4e158b7b04778d1cb7e9 (patch)
treefc7f570e687743bb1fd0669cf7f8cbf0e204ebc6 /session.c
parentdb30b12d7b41565aa7215c7aa45709cda0b41ab3 (diff)
- stevesk@cvs.openbsd.org 2002/09/12 19:50:36
[session.c ssh.1] add SSH_CONNECTION and deprecate SSH_CLIENT; bug #384. ok markus@
Diffstat (limited to 'session.c')
-rw-r--r--session.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/session.c b/session.c
index d017b17f9..5da295289 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.148 2002/08/29 15:57:25 stevesk Exp $"); 36RCSID("$OpenBSD: session.c,v 1.149 2002/09/12 19:50:36 stevesk Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -1011,10 +1011,16 @@ do_setup_env(Session *s, const char *shell)
1011 } 1011 }
1012 } 1012 }
1013 1013
1014 /* SSH_CLIENT deprecated */
1014 snprintf(buf, sizeof buf, "%.50s %d %d", 1015 snprintf(buf, sizeof buf, "%.50s %d %d",
1015 get_remote_ipaddr(), get_remote_port(), get_local_port()); 1016 get_remote_ipaddr(), get_remote_port(), get_local_port());
1016 child_set_env(&env, &envsize, "SSH_CLIENT", buf); 1017 child_set_env(&env, &envsize, "SSH_CLIENT", buf);
1017 1018
1019 snprintf(buf, sizeof buf, "%.50s %d %.50s %d",
1020 get_remote_ipaddr(), get_remote_port(),
1021 get_local_ipaddr(packet_get_connection_in()), get_local_port());
1022 child_set_env(&env, &envsize, "SSH_CONNECTION", buf);
1023
1018 if (s->ttyfd != -1) 1024 if (s->ttyfd != -1)
1019 child_set_env(&env, &envsize, "SSH_TTY", s->tty); 1025 child_set_env(&env, &envsize, "SSH_TTY", s->tty);
1020 if (s->term) 1026 if (s->term)