Граф коммитов

29 Коммитов

Автор SHA1 Сообщение Дата
Ben Harris 694aafa071 Add the ability to close sessions. This adds *_free() functions to most
areas of the code.  Not all back-ends have been tested, but Telnet and SSH
behave reasonably.

Incidentally, almost all of this patch was written through Mac PuTTY,
admittedly over a Telnet connection.

[originally from svn r2615]
2003-01-15 23:30:21 +00:00
Simon Tatham 952857fca3 proxy.c now no longer refers to `cfg'. Instead, each of the three
proxy-indirection network functions (name_lookup, new_connection,
new_listener) takes a `const Config *' as an argument, and extracts
enough information from it before returning to handle that
particular network operation in accordance with the proxy settings
it specifies. This involved {win,ux}net.c due to a `const'
repercussion.

[originally from svn r2567]
2003-01-12 15:26:10 +00:00
Simon Tatham fee1624c69 Support for XDM-AUTHORIZATION-1 at the SSH server end, making use of
the remote IP/port data provided by the server for forwarded
connections. Disabled by default, since it's incompatible with SSH2,
probably incompatible with some X clients, and tickles a bug in
at least one version of OpenSSH.

[originally from svn r2554]
2003-01-12 14:11:38 +00:00
Ben Harris 3aec19fa72 Move the prototype for platform_get_x11_auth() from x11fwd.c to ssh.h so that
it can be checked against the implementation.

[originally from svn r2542]
2003-01-11 14:20:00 +00:00
Ben Harris 8adae8f2ff Add a cast for a char * vs unsigned char * conflict.
[originally from svn r2541]
2003-01-11 14:08:46 +00:00
Simon Tatham 87f9446a26 Support XDM-AUTHORIZATION-1 for connecting to local X servers. If
we're going to be a security program, we can at least make a token
effort to use the most secure local X auth available! And I'm still
half-tempted to see if I can support it for remote X servers too...

[originally from svn r2537]
2003-01-11 09:31:54 +00:00
Simon Tatham 86977efa81 Introduce framework for authenticating with the local X server.
Windows and Mac backends have acquired auth-finding functions which
do nothing; Unix backend has acquired one which actually works, so
Plink can now do X forwarding believably.
(This checkin stretches into some unlikely parts of the code because
there have been one or two knock-on effects involving `const'. Bah.)

[originally from svn r2536]
2003-01-10 18:33:35 +00:00
Ben Harris 3f055f22d8 Move x11fwd and portfwd prototypes from ssh.c into ssh.h so they can be seen
by (and checked against) the definitions.

[originally from svn r2474]
2003-01-05 22:53:23 +00:00
Ben Harris 1e9b54cb1f SC in "finding an actual bug" shocker! Set the port number before passing
it to name_lookup().

[originally from svn r2473]
2003-01-05 22:52:11 +00:00
Ben Harris f4e13ef19b "possible unintended assignment"? I think not.
[originally from svn r2468]
2003-01-05 14:23:30 +00:00
Ben Harris b9e913ab88 char * vs unsigned char * (by explicit cast).
[originally from svn r2467]
2003-01-05 14:20:49 +00:00
Simon Tatham a298b2fe4b A couple of X forwarding fixes for Unix Plink. Firstly, under Unix
the default X display should be whatever comes out of $DISPLAY,
rather than Windows's hardwired `localhost:0'. Secondly, this may
give rise to a display name without a hostname (`:0' or similar),
which we now need to be able to deal with. Of course, we still don't
_properly_ support X forwarding in Unix Plink, since we still can't
authenticate with the local display.

[originally from svn r2420]
2003-01-02 10:45:56 +00:00
Simon Tatham 368ead15bc Propagate the screen number from a local X display to the remote
forwarded one. Fixes `x11-default-screen'.

[originally from svn r2418]
2003-01-02 10:41:22 +00:00
Simon Tatham a564ad3140 Support for doing DNS at the proxy end. I've invented a new type of
SockAddr, which just contains an unresolved hostname and is created
by a stub function in *net.c. It's an error to pass this to most of
the real-meat functions in *net.c; these fake addresses should have
been dealt with by the time they get down that far. proxy.c now
contains name_lookup(), a wrapper on sk_namelookup() which decides
whether or not to do real DNS, and the individual proxy
implementations each deal sensibly with being handed an unresolved
address and avoid ever passing one down to *net.c.

[originally from svn r2353]
2002-12-18 16:23:11 +00:00
Simon Tatham 52bdffbfe0 More preparatory work: remove the <windows.h> include from lots of
source files in which it's no longer required (it was previously
required in anything that included <putty.h>, but not any more).
Also moved a couple of stray bits of exposed WinSock back into
winnet.c (getservbyname from ssh.c and AF_INET from proxy.c).

[originally from svn r2160]
2002-10-30 17:57:31 +00:00
Simon Tatham ae09bf1c95 X forwarding authentication is now invented on a per-SSH-connection
basis, so the statics are gone from x11fwd.c.

[originally from svn r2145]
2002-10-26 11:23:15 +00:00
Simon Tatham eabd704d1e Justin Bradford's proxy support patch. Currently supports only HTTP
CONNECT, but contains an extensible framework to allow other
proxies. Apparently SOCKS and ad-hoc-telnet-proxy are already
planned (the GUI mentions them already even though they don't work
yet). GUI includes full configurability and allows definition of
exclusion zones. Rock and roll.

[originally from svn r1598]
2002-03-23 17:47:21 +00:00
Simon Tatham cf356a9a5f Pageant is now able to avoid asking for the passphrase when asked to
load a key that is already loaded. This makes command lines such as
`pageant mykey -c mycommand' almost infinitely more useful.

[originally from svn r1522]
2001-12-30 15:58:17 +00:00
Simon Tatham 3270c74f9e Configurable TCP_NODELAY option on network connections
[originally from svn r1428]
2001-11-29 21:47:11 +00:00
Simon Tatham f143fff0db Semantic fix in the X11 `authentication failed' error packet
construction. Doesn't actually affect anything right now, since the
bug was a failure to round a length up to the next multiple of 4 and
it so happens that our current message was exactly 40 bytes anyway
:-) But if we start giving a wider variety of messages one day then
it might be handy to be able to do them without gratuitous crashes.

[originally from svn r1222]
2001-08-28 12:24:50 +00:00
Simon Tatham c87fa98d09 Extensive changes that _should_ fix the socket buffering problems,
by ceasing to listen on input channels if the corresponding output
channel isn't accepting data. Has had basic check-I-didn't-actually-
break-anything-too-badly testing, but hasn't been genuinely tested
in stress conditions (because concocting stress conditions is non-
trivial).

[originally from svn r1198]
2001-08-25 17:09:23 +00:00
Simon Tatham 50766ce729 SSH port forwarding! How cool is that?
Only currently works on SSH1; SSH2 should be doable but it's late
and I have other things to do tonight. The Cool Guy award for this
one goes to Nicolas Barry, for doing most of the work and actually
understanding the code he was adding to.

[originally from svn r1176]
2001-08-08 20:44:35 +00:00
Simon Tatham 3730ada5ce Run entire source base through GNU indent to tidy up the varying
coding styles of the various contributors! Woohoo!

[originally from svn r1098]
2001-05-06 14:35:20 +00:00
Simon Tatham c760ef6f83 Fix a segfault on abrupt X connection shutdown.
[originally from svn r998]
2001-03-15 11:19:59 +00:00
Simon Tatham 7b0e082700 Dave Hinton's modifications to the network layer interface, which
should make it possible to add SSL support later.

[originally from svn r996]
2001-03-13 10:22:45 +00:00
Simon Tatham 60585cff9c Yet another attempt at OOB handling in the network abstraction. This
version allows you to specify, per socket, which sockets receive OOB
data in-line (so that you know what was before the mark and what was
after) and which receive it out of line (so it's really a one-byte
out-of-band facility rather than discard-to-mark). This reflects the
fact that rlogin appears to make more sense in the latter mode, and
telnet in the former. This patch makes rlogin work right for me.

[originally from svn r921]
2001-02-01 14:11:04 +00:00
Simon Tatham 89505459e3 Improve socket error handling so that a socket error isn't an
automatic fatalbox(). Instead, the error is passed to the receiver
routine, which can decide just how fatal the problem really is.

[originally from svn r894]
2001-01-24 10:11:18 +00:00
Simon Tatham 1eb0308ad7 Remove the entirely pointless fourth parameter from x11_init().
[originally from svn r889]
2001-01-23 11:02:02 +00:00
Simon Tatham 4a339ef430 Add X11 forwarding, mainly thanks to Andreas Schultz
[originally from svn r878]
2001-01-22 11:34:52 +00:00