FWD: enable forwarding to remote named sockets in ssh

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



Dear openssh developers,

has the problem related to remote unix socket forwarding to a local port ever been fixed? (see message below: ssh -L 12345:/tmp/sock)

I could not find any code containing the patch (maybe i am looking in the wrong places)

I actually had the same problem and the feature is really handy if you are working on a windows machine.

Help is apreciated. Thanks!

Best regards,

Till Riedel

-------- Forwarded Message --------
List:       openbsd-tech
Subject:    enable forwarding to remote named sockets in ssh
From:       Jared Yanovich <slovichon () gmail ! com>
Date:       2014-08-08 20:38:11
Message-ID: 20140808203811.GK16425 () nightderanger ! psc ! edu
[Download message RAW]

I cannot forward to a socket on the remote host ("No forward host name.").

Example:

  ssh -L 12345:/tmp/sock

Index: channels.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/channels.c,v
retrieving revision 1.336
diff -u -p -r1.336 channels.c
--- channels.c	15 Jul 2014 15:54:14 -0000	1.336
+++ channels.c	8 Aug 2014 20:31:29 -0000
@@ -2771,13 +2770,18 @@ channel_setup_fwd_listener_tcpip(int typ
 	    fwd->listen_host : fwd->connect_host;
 	is_client = (type == SSH_CHANNEL_PORT_LISTENER);

-	if (host == NULL) {
-		error("No forward host name.");
-		return 0;
-	}
-	if (strlen(host) >= NI_MAXHOST) {
-		error("Forward host name too long.");
-		return 0;
+	if (type == SSH_CHANNEL_PORT_LISTENER &&
+	    fwd->connect_path)
+		host = fwd->connect_path;
+	else {
+		if (host == NULL) {
+			error("No forward host name.");
+			return 0;
+		}
+		if (strlen(host) >= NI_MAXHOST) {
+			error("Forward host name too long.");
+			return 0;
+		}
 	}

 	/* Determine the bind address, cf. channel_fwd_bind_addr() comment */
--
Karlsruhe Institute of Technology (KIT)
TECO - Technology for Pervasive Computing

Dr.-Ing. Dipl.-Inform. Till Riedel
Research Director TECO

post: KIT, TecO, Vincenz-Priessnitz-Str. 1, 76131 Karlsruhe, Germany
fon: +49 721 608-41706 , fax: +49 721 608-41702
email: riedel@xxxxxxxx , web: www.teco.edu/people/riedel

KIT – University of the State of Baden-Wuerttemberg
and National Large-scale Research Center of the Helmholtz Association
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev





[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux