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

1284 Коммитов

Автор SHA1 Сообщение Дата
Simon Tatham 317180ed49 First attempt at a Unix port of Plink. Seems to basically work;
doesn't yet use the SSH agent, no way to specify arbitrary config
options, no manpage yet, couple of other fiddly things need doing,
but it makes SSH connections and doesn't fall over horribly so I say
it's a good start. Now to run it under valgrind...

[originally from svn r2165]
2002-10-31 19:49:52 +00:00
Simon Tatham db71c5006e RJK's `pterm --help' patch. I _must_ find a better alternative to
this init sequence - it surely can't be right that `pterm --help'
with no DISPLAY complains at the lack of DISPLAY rather than giving
a help message!

[originally from svn r2164]
2002-10-30 18:22:37 +00:00
Simon Tatham 28a75f8b84 RJK's `make install' patch for the Unix makefile.
[originally from svn r2163]
2002-10-30 18:17:56 +00:00
Simon Tatham 79b086658d Further deglobalisation: settings.c now has a more sensible interface.
[originally from svn r2162]
2002-10-30 18:12:46 +00:00
Simon Tatham fda97938f3 Fix some consts.
[originally from svn r2161]
2002-10-30 18:12:22 +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 78c69239f1 Preparatory work before attempting a Unix port of plink: mkfiles.pl
needs to be able to handle separate Recipe entries for the same
program with different types (plink [C] and plink [X] for example,
with different object lists).

[originally from svn r2159]
2002-10-30 17:56:05 +00:00
Simon Tatham ce677ce258 Yikes - put back a #include I accidentally removed two revs ago!
That'd have been embarrassing. Mind you I'd like to remove this
particular #include for good anyway, but the time is not now...

[originally from svn r2158]
2002-10-29 16:54:09 +00:00
Simon Tatham 1c80391e61 Hmm. Probably best initialise mainchan as well; oops.
[originally from svn r2157]
2002-10-29 14:41:10 +00:00
Simon Tatham 7e4f9e1af0 Try actually initialising ssh->v1_compressing. With any luck this
will be what was causing Owen's crash report today.

[originally from svn r2156]
2002-10-29 13:05:20 +00:00
Simon Tatham 0720fc12ad terminal.c should call the frontend beep() routine even with
mode==BELL_VISUAL, otherwise taskbar flashing won't happen on visual
bells. It's up to the frontend routine to spot BELL_VISUAL and avoid
making any noise.

[originally from svn r2155]
2002-10-28 21:58:07 +00:00
Simon Tatham ec5a7ee940 CloseOnExit now defaults to COE_ALWAYS for pterm, bringing it back
into line with most other xtermalikes. On Unix, the exit code of a
shell is the last exit code of one of its child processes, even if
it's an interactive shell - so some pterms will close and some will
not for no particularly good reason. Power-detaching a screen
session is especially bad for this.
COE_NORMAL is still useful for specialist purposes (running a single
command in its own pterm), but I don't think it's a sane default,
unfortunately.

[originally from svn r2154]
2002-10-28 17:39:21 +00:00
Simon Tatham 963742fd4e Fix Alt+numberpad in pterm. For a start, there was a bug whereby if
a pterm came up while Alt was down, then releasing it would cause a
^@ to be generated. Also, though, I've decided that Alt plus a
single numberpad key should not generate a low-numbered control
code, because that's too easy to do by mistake and the codes are too
powerful. Anyone who really _wants_ to create a ^C or ^D from the
numberpad can do Alt-03 or Alt-04 easily enough; two-digit codes and
more such as Alt-65 are unaffected.

[originally from svn r2153]
2002-10-28 17:34:45 +00:00
Simon Tatham ac545e0530 Another deglobalisation bug: failed to initialise term->curstype.
Thanks to valgrind for finding this one (aha! I knew there would be
benefits from doing a Unix port!).

[originally from svn r2152]
2002-10-28 17:30:47 +00:00
Simon Tatham 9a5939e9cf First bug discovered as a result of global-removal: pasting into
pterm caused a crash because I had the wrong prototype for the
selection_received event handler. Should be fixed.

[originally from svn r2150]
2002-10-28 09:38:28 +00:00
Simon Tatham a4ca42238f Arrgh! _Another_ missed commit. I really must do something about
this bad habit of mine :-/

[originally from svn r2149]
2002-10-27 09:24:47 +00:00
Simon Tatham ea429ee71a Retire another global in favour of adding a feature to the
terminal.c interface.

[originally from svn r2148]
2002-10-26 14:06:52 +00:00
Simon Tatham 4756c15fc9 Yet more global-removal. The static variables in logging.c are now
absent, and also (I think) all the frontend request functions (such
as request_resize) take a context pointer, so that multiple windows
can be handled sensibly. I wouldn't swear to this, but I _think_
that only leaves the Unicode stuff as the last stubborn holdout.

[originally from svn r2147]
2002-10-26 12:58:13 +00:00
Simon Tatham d17f035447 Richard points out that it would probably help if I committed
ldisc.h. Bah. :-)

[originally from svn r2146]
2002-10-26 12:42:07 +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 feec0e22ea Fix proxy.c so that the static variables become const.
[originally from svn r2144]
2002-10-26 11:12:24 +00:00
Simon Tatham 948f95d5e8 Reorganised the Unicode layer somewhat: moved luni_send and
lpage_send out into the line discipline, making them _clients_ of
the Unicode layer rather than part of it. This means they can access
ldisc->term, which in turn means I've been able to remove the
temporary global variable `term'. We're slowly getting there.

[originally from svn r2143]
2002-10-26 11:08:59 +00:00
Simon Tatham 24530b945e Port forwarding module now passes backend handles around properly.
As a result I've now been able to turn the global variables `back'
and `backhandle' into module-level statics in the individual front
ends. Now _that's_ progress!

[originally from svn r2142]
2002-10-26 10:33:59 +00:00
Simon Tatham 0b2523eeda Line discipline module now uses dynamically allocated data. Also
fixed one or two other minor problems.

[originally from svn r2141]
2002-10-26 10:16:19 +00:00
Simon Tatham ba0468b983 Oops; remembering to call term_provide_resize_fn in the Unix front
end would probably help. Thanks Colin.

[originally from svn r2140]
2002-10-25 22:00:22 +00:00
Simon Tatham 5df8e45c2e The Zlib module now uses dynamically allocated contexts. I think
that completes the static-removal in the crypto library. Ooh.

[originally from svn r2136]
2002-10-25 13:26:33 +00:00
Simon Tatham db7196c174 Diffie-Hellman key exchange now uses a dynamically allocated context.
[originally from svn r2135]
2002-10-25 13:08:01 +00:00
Simon Tatham 2317fe7e53 Fix some compiler warnings.
[originally from svn r2134]
2002-10-25 13:00:45 +00:00
Simon Tatham 670c3f4019 Tidy up and fix a compiler warning.
[originally from svn r2133]
2002-10-25 12:59:57 +00:00
Simon Tatham 107d1d875d SSH CRC attack detector now uses a dynamically allocated context.
[originally from svn r2132]
2002-10-25 12:58:21 +00:00
Simon Tatham 8f91f07599 SSH2 MACs now use dynamically allocated contexts.
[originally from svn r2131]
2002-10-25 12:51:28 +00:00
Simon Tatham 9848062b86 SSH ciphers now use dynamically allocated contexts.
[originally from svn r2130]
2002-10-25 12:35:22 +00:00
Simon Tatham 528a826574 Fix the nasty flashing-light-grey-on-resize problem, after MCV
helpfully alerted me to the existence of gdk_window_set_background().

[originally from svn r2129]
2002-10-25 11:58:59 +00:00
Simon Tatham 6e2a0c079b pty backend now supports the changed function interface, so pterm
now compiles and runs again after the major destabilisation.
Unfortunately it wasn't feasible to actually encapsulate all of the
pty backend's data, since the utmp helper and the need to fork and
drop privileges before doing anything else at all rather confuses
matters. So the data handle passed around to the pty backend is a
null pointer, and the pty backend is just as global-ridden as it
always has been. Shame, but such is life.

[originally from svn r2128]
2002-10-25 11:50:51 +00:00
Simon Tatham 72ff571148 Major destabilisation, phase 2. This time it's the backends' turn:
each backend now stores all its internal variables in a big struct,
and each backend function gets a pointer to this struct passed to
it. This still isn't the end of the work - lots of subsidiary things
still use globals, notably all the cipher and compressor modules and
the X11 forwarding authentication stuff. But ssh.c itself has now
been transformed, and that was the really painful bit, so from here
on it all ought to be a sequence of much smaller and simpler pieces
of work.

[originally from svn r2127]
2002-10-25 11:30:33 +00:00
Simon Tatham c2e37334a5 Need to stub frontend_keypress() in console.c as well as window.c.
[originally from svn r2126]
2002-10-24 14:48:08 +00:00
Simon Tatham 6e549a6db3 Oops - repercussions of the close-on-exit stuff which I forgot to
check in. I must stop doing my Unix checkins in the Unix subdir :-(

[originally from svn r2125]
2002-10-24 14:12:55 +00:00
Jacob Nevins c0a3c62f6a Minor compiler nits:
- use smalloc/sfree, not malloc/free
 - include <ctype.h>
 - include <string.h> (although this doesn't shut the compiler up about
   non-ANSI stricmp/strnicmp)

[originally from svn r2121]
2002-10-23 14:24:40 +00:00
Simon Tatham bdb47167d1 Implement handling of all Close On Exit modes. Default is to close
only on clean exit, which is a departure from most xterm-alikes but
Ian reckons people will love me for it. If this turns out to be
wrong, we can always change the default for Unix.

[originally from svn r2120]
2002-10-23 14:21:12 +00:00
Jacob Nevins 771b0299c3 Fixes for (Backend)->size() changes -- internal declarations didn't include
new arguments and neither did internal calls.

[originally from svn r2119]
2002-10-23 14:03:11 +00:00
Jacob Nevins 38413e0530 Remove apparently unnecessary declaration of typedef Config from winstuff.h --
it was breaking mingw builds (gcc being more picky than Visual C).

[originally from svn r2118]
2002-10-23 13:46:59 +00:00
Simon Tatham a9bd716df8 Cleanups from yesterday's destabilisation: lots of stuff in
terminal.c was apparently relying on implicit initialisation to
zero, and also I've removed the backends' dependency on terminal.h
by having terminal sizes explicitly passed in to back->size().

[originally from svn r2117]
2002-10-23 12:41:35 +00:00
Simon Tatham bddc6d16ee Oops. Forgot to check in terminal.h from yesterday's work. There's
always one :-/

[originally from svn r2116]
2002-10-23 09:11:36 +00:00
Simon Tatham 0a80c983e2 Major destabilisation, phase 1. In this phase I've moved (I think)
all the global and function-static variables out of terminal.c into
a dynamically allocated data structure. Note that this does not yet
confer the ability to run more than one of them in the same process,
because other things (the line discipline, the back end) are still
global, and also in particular the address of the dynamically
allocated terminal-data structure is held in a global variable
`term'. But what I've got here represents a reasonable stopping
point at which to check things in. In _theory_ this should all still
work happily, on both Unix and Windows. In practice, who knows?

[originally from svn r2115]
2002-10-22 16:11:33 +00:00
Simon Tatham 48314f7dc0 Make -ut work the right way round! :-)
[originally from svn r2114]
2002-10-22 13:27:58 +00:00
Simon Tatham 5ce13aad0f Stop `pterm -ut-' leaving the unnecessary utmp helper as a zombie
process (Debian bug #165887).

[originally from svn r2113]
2002-10-22 13:26:57 +00:00
Simon Tatham bf0e8374f2 Thanks to Richard B for pointing out that xterm has its own variants
of the alternate-screen and save-cursor control sequences, with
subtly different semantics and entertaining interactions with the
usual ones. No thanks to xterm for doing so in the first place :-(
This checkin should sort it all out.

[originally from svn r2112]
2002-10-22 10:31:23 +00:00
Simon Tatham d32e06c1fe Justin Bradford's patch for increased proxy robustness.
[originally from svn r2111]
2002-10-22 09:40:38 +00:00
Simon Tatham 45c494ff9d Make sure SIGINT and SIGQUIT haven't been nobbled in our child
process by weird POSIX-required shell behaviour.

[originally from svn r2110]
2002-10-21 23:01:34 +00:00
Simon Tatham 068da38044 Don't bother closing fds 0-2 before dup2ing over them; there's no
need, and it means we always have a valid open stderr.

[originally from svn r2109]
2002-10-21 23:00:18 +00:00