diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.153 2003/02/06 09:26:23 markus Exp $"); | 36 | RCSID("$OpenBSD: session.c,v 1.154 2003/03/05 22:33:43 markus Exp $"); |
37 | 37 | ||
38 | #include "ssh.h" | 38 | #include "ssh.h" |
39 | #include "ssh1.h" | 39 | #include "ssh1.h" |
@@ -951,7 +951,7 @@ do_setup_env(Session *s, const char *shell) | |||
951 | { | 951 | { |
952 | char buf[256]; | 952 | char buf[256]; |
953 | u_int i, envsize; | 953 | u_int i, envsize; |
954 | char **env; | 954 | char **env, *laddr; |
955 | struct passwd *pw = s->pw; | 955 | struct passwd *pw = s->pw; |
956 | 956 | ||
957 | /* Initialize the environment. */ | 957 | /* Initialize the environment. */ |
@@ -1030,9 +1030,10 @@ do_setup_env(Session *s, const char *shell) | |||
1030 | get_remote_ipaddr(), get_remote_port(), get_local_port()); | 1030 | get_remote_ipaddr(), get_remote_port(), get_local_port()); |
1031 | child_set_env(&env, &envsize, "SSH_CLIENT", buf); | 1031 | child_set_env(&env, &envsize, "SSH_CLIENT", buf); |
1032 | 1032 | ||
1033 | laddr = get_local_ipaddr(packet_get_connection_in()); | ||
1033 | snprintf(buf, sizeof buf, "%.50s %d %.50s %d", | 1034 | snprintf(buf, sizeof buf, "%.50s %d %.50s %d", |
1034 | get_remote_ipaddr(), get_remote_port(), | 1035 | get_remote_ipaddr(), get_remote_port(), laddr, get_local_port()); |
1035 | get_local_ipaddr(packet_get_connection_in()), get_local_port()); | 1036 | xfree(laddr); |
1036 | child_set_env(&env, &envsize, "SSH_CONNECTION", buf); | 1037 | child_set_env(&env, &envsize, "SSH_CONNECTION", buf); |
1037 | 1038 | ||
1038 | if (s->ttyfd != -1) | 1039 | if (s->ttyfd != -1) |