Created attachment 2654 [details] the patch Later versions of OpenSSH allow the user to forward connections also to/from Unix sockets. This patch allows to use Unix sockets as the target when forwarding the local stdio using the -W feature.
Some comments about the patch before I forget about them: The same variables that were hosting the hostname now also can host the socket path. The magic port number PORT_STREAMLOCAL (-2) is used to indicate that it is a socket path. I have to promote a couple of function argument from u_short to u_int to let the PORT_STREAMLOCAL pass unmangled (as (u_short)PORT_STREAMLOCAL results in a valid TCP port number). I have done a s/host/path/ in some variable names. That's consistent with the naming of the hostname/path slot in the Channel structure.
Comment on attachment 2654 [details] the patch >-channel_connect_stdio_fwd(const char *host_to_connect, u_short port_to_connect, >+channel_connect_stdio_fwd(const char *path_to_connect, u_int port_to_connect, any reason to keep port_to_connect as unsigned? PORT_STREAMLOCAL is negative and a signed int can cover that as well as the entire port range without casts. Also, I think I'd rather not rename host_to_connect: path_to_connect isn't correct for the common case either and it makes the change a long more invasive. Still looking at rest of patch.
Created attachment 2675 [details] revised streamlocal -W patch Revised patch as per comments. Currently untested.
Created attachment 2676 [details] revised revised streamlocal -W patch Same again with a couple of style nits fixed too.
I have an equivalent diff in my own tree that I've tested. I think this should go in.
Todd, do you mean the attached diff or the one in your tree? (or that they are basically the same?)