1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00
Commit Graph

2298 Commits

Author SHA1 Message Date
Jacob Nevins
cac296d9c0 Document recent SFTP changes:
- document behaviour of "-r" with mget/mput/reget/reput
 - document "close" command
 - document SFTP wildcard syntax for those who may not be familiar with Unix
   wildcards

[originally from svn r5004]
2004-12-17 13:00:01 +00:00
Simon Tatham
ba470dec5e I _think_ I've just fixed `font-overflow'. term->disptext now tracks
the start of every contiguous run passed to do_text() or
do_cursor(), and arranges never to overwrite only part of such a run
on the next update.

I'm a bit worried about this checkin because I've also completely
revamped cursor handling: the cursor was previously being drawn
_outside_ the main loop over the display line, and is now drawn as
part of that loop when it gets to the cursor location. It _seems_ to
still work sensibly, even in complex cases involving LATTR_WIDE and
double-width CJK characters etc, but I won't be entirely happy until
it's had some beta use.

[originally from svn r5003]
[this svn revision also touched putty-wishlist]
2004-12-17 12:55:12 +00:00
Jacob Nevins
cf44c428e3 Update online help for "-r" and "--" options to get/put commands.
Use command name in error messages rather than hardcoded "get:"/"put:".

[originally from svn r5002]
2004-12-17 12:15:17 +00:00
Simon Tatham
f4246872c4 Divide the do_paint() loop into several subloops. The activity of
going through the line and working out which bits need to be redrawn
is now in a separate loop from the subsequent activity of actually
going through and doing the redraws. This _should_ enable me to
tinker with the which-bits-to-redraw data in between the two, thus
fixing `font-overflow'. However, I thought it would be sensible to
break the work up into two commits so we can track bugs in the
restructuring separately from bugs introduced by the new feature.

Also added a couple more terminal test files.

[originally from svn r5001]
2004-12-17 11:37:16 +00:00
Simon Tatham
fb6a1e9d42 I had apparently broken wrapping of double-width characters (again).
Also fixed the new UTF-8 test file so that it tests double-width
wrapping both with _and_ without LATTR_WRAPPED2.

[originally from svn r5000]
2004-12-17 11:24:25 +00:00
Simon Tatham
4a8c36d4b7 I'd rather not keep losing these little test files, so here's some
stuff that I can `cat' into a terminal to test particular features
of it.

[originally from svn r4999]
2004-12-17 11:18:13 +00:00
Simon Tatham
ebf507497d Apparently SIGCHLD is blocked by default in processes run in a
pterm, which was breaking my bash job notification patch. This is
apparently not the case for xterm, so I've fiddled with it. Not
entirely sure _why_ it did this in the first place, but there we go.

[originally from svn r4997]
2004-12-17 09:43:09 +00:00
Simon Tatham
6c81ee6706 General mechanism for ensuring a dodgy SFTP server can't return
malicious filenames via FXP_READDIR.

[originally from svn r4995]
2004-12-16 19:36:47 +00:00
Simon Tatham
5ea746b15d Implement the `close' command, which terminates an SFTP session but
does not quit PSFTP, so you can then issue another `open' to connect
to somewhere else. This has apparently been trivial for some time,
for exactly the same reasons that `reuse-windows' was so easy, but
it hadn't occurred to me to actually do it until now.

[originally from svn r4994]
2004-12-16 19:19:59 +00:00
Simon Tatham
f1585f8f46 Jacob points out that I introduced a bug in PSFTP when I did the
timing shakeup: just running `psftp' caused the net/stdin select
loop (on both Unix and Windows) to get confused at the lack of any
network connection and give up immediately. Should now be fixed.

[originally from svn r4993]
2004-12-16 19:15:38 +00:00
Simon Tatham
69303f2d3e Wildcards in ls'. I think that completes psftp-multi'. Woo!
[originally from svn r4992]
[this svn revision also touched putty-wishlist]
2004-12-16 17:45:29 +00:00
Simon Tatham
a4fe439184 Implement mget and mput in PSFTP, supporting wildcards.
[originally from svn r4991]
[this svn revision also touched putty-wishlist]
2004-12-16 17:35:20 +00:00
Simon Tatham
bee5812a49 Support for recursive file transfer in PSFTP.
[originally from svn r4990]
[this svn revision also touched putty-wishlist]
2004-12-16 16:37:37 +00:00
Simon Tatham
d67bc798aa Fix obviously stupid segfault. Ahem.
[originally from svn r4989]
2004-12-16 15:38:39 +00:00
Jacob Nevins
a2e01a5604 Abe Crabtree complains that flushing the log file as often as we do in 0.56
results in unacceptable performance for him on Win2000. Add a checkbox to
revert to the old behaviour.

[originally from svn r4988]
[this svn revision also touched putty-wishlist]
2004-12-16 15:22:36 +00:00
Simon Tatham
89f4cf6a0a Rename scp.* to pscp.*, because I always misspell it that way. Also
it's more consistent with PSFTP like this: scp.c/pscp.c is more
similar to psftp.c (the main application framework) than it is to
sftp.c (a set of back-end library routines).

[originally from svn r4987]
2004-12-16 15:01:43 +00:00
Simon Tatham
6ef62aacfc Unix PSCP was tight-looping when connecting through a ProxyCommand.
Turned out that sk_localproxy_close() was closing the pipe fds
without removing them from the uxsel list.

[originally from svn r4965]
2004-12-10 11:41:14 +00:00
Simon Tatham
e711121152 Replace the RLE-based getType() function with one that binary-
searches a list of (start,end,type) tuples. This increases data size
by about 5Kb, which is a shame; but on the plus side, it boosts
performance from O(N) to O(log N). As an added bonus, the table now
covers _all_ of Unicode, not just the BMP.

[originally from svn r4964]
2004-12-08 19:41:14 +00:00
Simon Tatham
45534b2a5f Further clarity and speed cleanups of minibidi:
- rewrote the reversal loop in flipThisRun to be considerably clearer
 - rewrote leastGreaterOdd and leastGreaterEven as bit-twiddling macros
 - replaced malloc/free with snewn/sfree
 - lost some gratuitous repeat calls of getType on the same character
And most noticeably:
 - got rid of minibidi.h, since it was entirely full of minibidi.c
   internals (including constant data definitions!) and wasn't used
   to provide an external interface at all. Everything in it has
   been folded into minibidi.c.

[originally from svn r4963]
2004-12-08 19:07:05 +00:00
Simon Tatham
73231eeb54 Reformat minibidi.[ch] in line with my coding conventions. It was
just getting to be too much hassle trying to work with the existing
indentation.

[originally from svn r4952]
2004-12-07 18:18:28 +00:00
Simon Tatham
52eb87aed2 Bidi stability work. I _think_ I've now removed all the failures of
array bounds checking.

[originally from svn r4951]
2004-12-07 18:10:09 +00:00
Owen Dunn
30e94b6a5c Fix segfault when HOME not set on Unix.
[originally from svn r4948]
2004-12-07 11:50:44 +00:00
Simon Tatham
e83034fe3f \n and \r need double backslashes in Halibut.
[originally from svn r4947]
2004-12-02 13:48:32 +00:00
Jacob Nevins
d46ebde528 NULL a couple of members after freeing them in ssh_free(). In particular,
should stop ssh_do_close() accessing freed ssh->channels when invoked later
from ssh_free(). Spotted by Fred Sauer.

(Perhaps this is the cause of the crashes people have been reporting on
abnormal closures such as `Software caused connection abort'? I've not been
able to test this.)

[originally from svn r4946]
2004-12-02 13:37:28 +00:00
Ben Harris
3d3273337c Mention our assumptions about the execution character set. Not very
well-written, since my brain is largely absent today.

[originally from svn r4945]
2004-12-02 13:07:32 +00:00
Simon Tatham
9731b1425d Bah. Ben points out that SSH_1_ version strings should still end in
\n, and also that `\r' and `\n' don't mean what I think they mean on
all compilers (Mac reverses them).

[originally from svn r4941]
2004-12-01 15:34:12 +00:00
Simon Tatham
4c31b113a6 And now I look at it, the latest draft also says version strings
should be followed by \r\n, not just \n.

[originally from svn r4940]
2004-12-01 13:42:50 +00:00
Simon Tatham
22c46786be Kimmo Parviainen points out that SSH software version strings have
restrictions on the use of hyphens and spaces.

[originally from svn r4939]
2004-12-01 13:37:31 +00:00
Simon Tatham
a10edf435b term_bidi_cache_store() now has a need to distinguish between the
_width_ of a terminal line (number of character cell positions) and
its _size_ (number of termchars), since of course these differ in
the presence of combining characters.

[originally from svn r4938]
2004-12-01 09:25:20 +00:00
Simon Tatham
44aca28fad Fix large memory leak introduced in the r4915 bidi changes.
[originally from svn r4936]
[r4915 == 569da2eb7b]
2004-11-30 13:39:58 +00:00
Jacob Nevins
4cb0ead447 Another default-background fix for 256-colour mode
[originally from svn r4931]
2004-11-30 01:07:29 +00:00
Owen Dunn
7e7aec0ca4 Nitpick, close bracket.
[originally from svn r4926]
2004-11-29 16:58:02 +00:00
Simon Tatham
f237e23aff Some blurb about terminal types and 256-colour xterms. Thanks to Dan
Nicolaescu for the suggestion.

[originally from svn r4925]
2004-11-29 11:31:21 +00:00
Jacob Nevins
27cad589cc rm '$Source$' from comments as not meaningful under Subversion
[originally from svn r4924]
2004-11-29 09:40:59 +00:00
Jacob Nevins
d0992ade3d typo in comment
[originally from svn r4923]
2004-11-29 09:27:13 +00:00
Jacob Nevins
96a5923cc3 Briefly document the "CP866" manual-entry feature on Windows in the dialog
itself (since we have a bit of room).

[originally from svn r4922]
2004-11-29 09:23:11 +00:00
Simon Tatham
0600e8cf75 Bah, there's always one thing I miss. Correct the background-colour
handling in Unix PuTTY.

[originally from svn r4918]
2004-11-28 15:18:23 +00:00
Simon Tatham
e4e10e494b Implement xterm 256-colour mode.
[originally from svn r4917]
[this svn revision also touched putty-wishlist]
2004-11-28 15:13:34 +00:00
Simon Tatham
cdbb891f0f Stability fixes (thanks valgrind).
[originally from svn r4916]
2004-11-28 09:32:17 +00:00
Simon Tatham
569da2eb7b Cursor position, selection highlights and mouse clicks are now all
transformed back and forth according to the character position
permutation output from the bidi algorithm. I was expecting that to
be a lot harder.

[originally from svn r4915]
2004-11-28 09:24:57 +00:00
Simon Tatham
c66ac86b91 Oops; forgot to add this file in r4913.
[originally from svn r4914]
[r4913 == 8c69ba0672]
2004-11-28 00:48:31 +00:00
Simon Tatham
8c69ba0672 Loose end from timing shakeup: sshrand.c is now a client of
timing.c, and hence takes its own responsibility for calling
noise_regular() at regular intervals. Again, this means it will be
called consistently in _all_ the SSH-speaking tools, not just those
in which I remembered to call it!

[originally from svn r4913]
2004-11-27 19:56:38 +00:00
Simon Tatham
9fc67313fb Changes in startup order to ensure any subsystem which might attempt
to schedule timers is not started until after hwnd is initialised.

[originally from svn r4912]
2004-11-27 19:41:24 +00:00
Simon Tatham
92f3b101f5 Slight improvement to cursor blink timing: since the cursor doesn't
blink when the window doesn't have focus, we don't schedule blink
timers at that point either.

Infrastructure change: term->has_focus should now not be written
directly from outside terminal.c. Instead, use the function
term_set_focus, which will sort out the blink timers as well.

[originally from svn r4911]
2004-11-27 19:34:45 +00:00
Simon Tatham
02b0474f57 Almost _all_ of the final connection-layer loop, in both SSH1 and
SSH2, is now handled by the packet dispatch table. Dispatch table
entries are enabled as soon as possible, so that if anyone tries to
(for example) start using a forwarded port before the main shell
session setup has finished, things should work sensibly.

The SSH code is now a hybrid of coroutine-based sequential logic and
table-driven event dispatch, each where it makes the most sense. I'm
rather pleased with it.

Should fix: ext-data-at-start, portfwd-at-start.

[originally from svn r4909]
[this svn revision also touched putty-wishlist]
2004-11-27 15:32:45 +00:00
Simon Tatham
812870d1b3 Implement client-initiated rekeys after an hour, or after 1Gb of
data transfer in either direction (whichever comes first), or at
explicit client request (nice idea Jacob). Have tested by lowering
the limits, and it all seems solid enough; in particular, this has
also allowed me to test the behaviour when connection-level data is
received during rekey, and that looks fine too (at least it does
_now_ :-).

[originally from svn r4908]
[this svn revision also touched putty-wishlist]
2004-11-27 14:29:20 +00:00
Simon Tatham
fc9dd5cbaa Bah, I knew I'd miss _something_. term_out is now static, so
declaring it in putty.h gives a warning under Unix.

[originally from svn r4907]
2004-11-27 13:31:07 +00:00
Simon Tatham
7ecf13564a New timing infrastructure. There's a new function schedule_timer()
which pretty much any module can call to request a call-back in the
future. So terminal.c can do its own handling of blinking, visual
bells and deferred screen updates, without having to rely on
term_update() being called 50 times a second (fixes: pterm-timer);
and ssh.c and telnet.c both invoke a new module pinger.c which takes
care of sending keepalives, so they get sent uniformly in all front
ends (fixes: plink-keepalives, unix-keepalives).

[originally from svn r4906]
[this svn revision also touched putty-wishlist]
2004-11-27 13:20:21 +00:00
Jacob Nevins
d609e1f7f8 uint64_decimal() incorrectly output 0 as "" instead of "0". This only affected
PSFTP's "reput" chat. Spotted by Greg Parker.

[originally from svn r4904]
2004-11-25 13:40:01 +00:00
Simon Tatham
a4ba026838 Re-architected the top level of the SSH protocol handlers.
ssh1_protocol() and ssh2_protocol() are now high-level functions
which see _every_ SSH packet and decide which lower-level function
to pass it to. Also, they each support a dispatch table of simple
handler functions for message types which can arrive at any time.
Results are:

 - ignore, debug and disconnect messages are now handled by the
   dispatch table rather than being warts in the rdpkt functions

 - SSH2_MSG_WINDOW_ADJUST is handled by the dispatch table, which
   means that do_ssh2_authconn doesn't have to explicitly
   special-case it absolutely every time it waits for a response to
   its latest channel request

 - the top-level SSH2 protocol function chooses whether messages get
   funnelled to the transport layer or the auth/conn layer based on
   the message number ranges defined in the SSH architecture draft -
   so things that should go to auth/conn go there even in the middle
   of a rekey (although a special case is that nothing goes to
   auth/conn until initial kex has finished). This should fix the
   other half of ssh2-kex-data.

[originally from svn r4901]
2004-11-24 20:35:15 +00:00