mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
ae1148267d
Historically, because of the way Windows Pageant's IPC works, PuTTY's agent forwarding has always been message-oriented. The channel implementation in agentf.c deals with receiving a data stream from the remote agent client and breaking it up into messages, and then it passes each message individually to agent_query(). On Unix, this is more work than is really needed, and I've always meant to get round to doing the more obvious thing: making an agent forwarding channel into simply a stream-oriented proxy, passing raw data back and forth between the SSH channel and the local AF_UNIX socket without having to know or care about the message boundaries in the stream. The portfwdmgr_connect_socket() facility introduced by the previous commit is the missing piece of infrastructure to make that possible. Now, the agent client module provides an API that includes a callback you can pass to portfwdmgr_connect_socket() to open a streamed agent connection, and the agent forwarding setup function tries to use that where possible, only falling back to the message-based agentf.c system if it can't be done. On Windows, the new piece of agent-client API returns failure, so we still fall back to agentf.c there. There are two benefits to doing it this way. One is that it's just simpler and more robust: if PuTTY isn't trying to parse the agent connection, then it has less work to do and fewer places to introduce bugs. The other is that it's futureproof against changes in the agent protocol: if any kind of extension is ever introduced that requires keeping state within a single agent connection, or that changes the protocol itself so that agentf's message-boundary detection stops working, then this forwarding system will still work. |
||
---|---|---|
.. | ||
configure | ||
gtkapp.c | ||
gtkask.c | ||
gtkcfg.c | ||
gtkcols.c | ||
gtkcols.h | ||
gtkcomm.c | ||
gtkcompat.h | ||
gtkdlg.c | ||
gtkfont.c | ||
gtkfont.h | ||
gtkmain.c | ||
gtkmisc.c | ||
gtkmisc.h | ||
gtkwin.c | ||
osxlaunch.c | ||
procnet.c | ||
pterm.bundle | ||
pterm.plist | ||
putty.bundle | ||
putty.plist | ||
unix.h | ||
ux_x11.c | ||
uxagentc.c | ||
uxagentsock.c | ||
uxcfg.c | ||
uxcons.c | ||
uxfdsock.c | ||
uxgen.c | ||
uxgss.c | ||
uxmisc.c | ||
uxnet.c | ||
uxnogtk.c | ||
uxnoise.c | ||
uxpeer.c | ||
uxpgnt.c | ||
uxplink.c | ||
uxpoll.c | ||
uxprint.c | ||
uxproxy.c | ||
uxpterm.c | ||
uxpty.c | ||
uxputty.c | ||
uxsel.c | ||
uxser.c | ||
uxserver.c | ||
uxsftp.c | ||
uxsftpserver.c | ||
uxshare.c | ||
uxsignal.c | ||
uxstore.c | ||
uxucs.c | ||
uxutils.c | ||
x11misc.c | ||
x11misc.h | ||
xkeysym.c | ||
xpmptcfg.c | ||
xpmpterm.c | ||
xpmpucfg.c | ||
xpmputty.c |