]> andersk Git - openssh.git/commitdiff
- stevesk@cvs.openbsd.org 2002/09/12 19:50:36
authordjm <djm>
Thu, 19 Sep 2002 01:47:55 +0000 (01:47 +0000)
committerdjm <djm>
Thu, 19 Sep 2002 01:47:55 +0000 (01:47 +0000)
     [session.c ssh.1]
     add SSH_CONNECTION and deprecate SSH_CLIENT; bug #384.  ok markus@

ChangeLog
session.c
ssh.1

index b78ef8a43ae03e2696fd6caa924c722651284125..c019d238dbf9ee5c4d985b600321fa27ebb1dbb7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
    - stevesk@cvs.openbsd.org 2002/09/12 19:11:52
      [ssh-agent.c]
      %u for uid print; ok markus@
+   - 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@
 
 20020912
  - (djm) Made GNOME askpass programs return non-zero if cancel button is 
index d017b17f98af977b28b88c0e31fd57bd927bf15f..5da2952896c0cdab3551f95c7c82ef79071ef96c 100644 (file)
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.148 2002/08/29 15:57:25 stevesk Exp $");
+RCSID("$OpenBSD: session.c,v 1.149 2002/09/12 19:50:36 stevesk Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -1011,10 +1011,16 @@ do_setup_env(Session *s, const char *shell)
                }
        }
 
+       /* SSH_CLIENT deprecated */
        snprintf(buf, sizeof buf, "%.50s %d %d",
            get_remote_ipaddr(), get_remote_port(), get_local_port());
        child_set_env(&env, &envsize, "SSH_CLIENT", buf);
 
+       snprintf(buf, sizeof buf, "%.50s %d %.50s %d",
+           get_remote_ipaddr(), get_remote_port(),
+           get_local_ipaddr(packet_get_connection_in()), get_local_port());
+       child_set_env(&env, &envsize, "SSH_CONNECTION", buf);
+
        if (s->ttyfd != -1)
                child_set_env(&env, &envsize, "SSH_TTY", s->tty);
        if (s->term)
diff --git a/ssh.1 b/ssh.1
index ce0dd291dd442499f6d29f32b62500ff0660283a..a65da561170e14b132d94f9cee2dc355dfc21de5 100644 (file)
--- a/ssh.1
+++ b/ssh.1
@@ -34,7 +34,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $OpenBSD: ssh.1,v 1.165 2002/09/11 17:55:03 stevesk Exp $
+.\" $OpenBSD: ssh.1,v 1.166 2002/09/12 19:50:36 stevesk Exp $
 .Dd September 25, 1999
 .Dt SSH 1
 .Os
@@ -726,11 +726,11 @@ to make this work.)
 .It Ev SSH_AUTH_SOCK
 Identifies the path of a unix-domain socket used to communicate with the
 agent.
-.It Ev SSH_CLIENT
-Identifies the client end of the connection.
+.It Ev SSH_CONNECTION
+Identifies the client and server ends of the connection.
 The variable contains
-three space-separated values: client ip-address, client port number,
-and server port number.
+four space-separated values: client ip-address, client port number,
+server ip-address and server port number.
 .It Ev SSH_ORIGINAL_COMMAND
 The variable contains the original command line if a forced command
 is executed.
This page took 0.050743 seconds and 5 git commands to generate.