Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
History of file psftp.c at check-in 373c05b772c32028
|
2013-11-17
| ||
| 08:05 | Implement connection sharing between instances of PuTTY. The basic strategy is described at the top of the new source file sshshare.c. In very brief: an 'upstream' PuTTY opens a Unix-domain socket or Windows named pipe, and listens for connections from other PuTTYs wanting to run sessions on the same server. The protocol spoken down that socket/pipe is essentially the bare ssh-connection protocol, using a trivial binary packet protocol with no encryption, and the upstream has to do some fiddly transformations that I've been referring to as 'channel-number NAT' to avoid resource clashes between the sessions it's managing. This is quite different from OpenSSH's approach of using the Unix- domain socket as a means of passing file descriptors around; the main reason for that is that fd-passing is Unix-specific but this system has to work on Windows too. However, there are additional advantages, such as making it easy for each downstream PuTTY to run its own independent set of port and X11 forwardings (though the method for making the latter work is quite painful). Sharing is off by default, but configuration is intended to be very easy in the normal case - just tick one box in the SSH config panel and everything else happens automatically. file: [338aed47ee] check-in: [998dfad436] user: simon branch: trunk, size: 76739 | |
|
2013-07-22
| ||
| 14:55 | Fix a few more memory and resource leaks. file: [14b5590992] check-in: [9b3e8c1465] user: simon branch: trunk, size: 76655 | |
|
2013-07-19
| ||
| 12:44 | Add a nonfatal() function everywhere, to be used for reporting things that the user really ought to know but that are not actually fatal to continued operation of PuTTY or a single network connection. file: [e69d2e66ff] check-in: [ad8c919057] user: simon branch: trunk, size: 76555 | |
|
2013-07-14
| ||
| 05:46 | Fix another giant batch of resource leaks. (Mostly memory, but there's one missing fclose too.) file: [1c16723a08] check-in: [17fb711a78] user: simon branch: trunk, size: 76308 | |
|
2013-07-11
| ||
| 12:43 | Add an assortment of missing frees, and one missing file close. Mostly on error paths, although the one in PSFTP's wildcard_iterate will come up in normal usage. file: [f5a3ffa05c] check-in: [9c97222ada] user: simon branch: trunk, size: 76263 | |
| 12:24 | xfer_{up,down}load_gotpkt free their input sftp_packet as a side effect of handling it, but they do not free it if it isn't a packet they recognise as part of their upload/download. Invent a return value that specifically signals this, and consistently free pktin at every call site if that return value comes back. Also, ensure that that return value also always comes with something meaningful in fxp_error. file: [307483aadc] check-in: [1129bffc22] user: simon branch: trunk, size: 76235 | |
| 12:24 | Fix a couple of code paths on which, if fxp_readdir returned an error, we would return without first closing the directory handle we had used as an argument. file: [38a248a8c7] check-in: [1ab7f878e5] user: simon branch: trunk, size: 75961 | |
| 12:24 | It's not actually legal by the C standard to call qsort with a null array pointer, _even_ if you're asking it to sort zero elements so that in principle it should never dereference that pointer. Fix the four instances in PSCP/PSFTP where this was previously occurring. file: [bea47abde8] check-in: [ff4be3ebbd] user: simon branch: trunk, size: 75804 | |
| 12:24 | Remove redundant null checks for arguments to sftp_{get,put}_file which are (a) never NULL anyway, and (b) have already been dereferenced by the time we make those checks so it would be too late if they were. file: [9f8e6df66d] check-in: [d149b789c1] user: simon branch: trunk, size: 75695 | |
|
2013-07-06
| ||
| 15:43 | Clean up handling of the return value from sftp_find_request. In many places we simply enforce by assertion that it will match the request we sent out a moment ago: in fact it can also return NULL, so it makes more sense to report a proper error message if it doesn't return the expected value, and while we're at it, have that error message whatever message was helpfully left in fxp_error() by sftp_find_request when it failed. To do this, I've written a centralised function in psftp.c called sftp_wait_for_reply, which is handed a request that's just been sent out and deals with the mechanics of waiting for its reply, returning the reply when it arrives, and aborting with a sensible error if anything else arrives instead. The numerous sites in psftp.c which called sftp_find_request have all been rewritten to do this instead, and as a side effect they now look more sensible. The only other uses of sftp_find_request were in xfer_*load_gotpkt, which had to be tweaked in its own way. While I'm here, also fix memory management in sftp_find_request, which was freeing its input packet on some but not all error return paths. file: [3301f66ca7] check-in: [14608d0542] user: simon branch: trunk, size: 75954 | |
|
2012-09-19
| ||
| 12:08 | Make --help and --version work consistently across all tools. Well, at least across all command-line tools on both Windows and Unix, and the GTK apps on Unix too. The Windows GUI apps fundamentally can't write to standard output and it doesn't seem sensible to use message boxes for these purposes :-) file: [5cd261cca4] check-in: [75423b66a5] user: simon branch: trunk, size: 77082 | |
|
2012-08-22
| ||
| 13:36 | Fix a bug in the PSFTP command parser which would cause it to hallucinate an extra empty argument word at the end of a line if the line ended in more than one whitespace character. file: [7202c95c01] check-in: [07769e1daf] user: simon branch: trunk, size: 76973 | |
|
2012-06-20
| ||
| 12:39 | John Hartnup reports that Apache SSHD's SFTP server responds to FXP_READDIR on an empty directory by returning a zero-length list of filenames, instead of the more common response of a list containing just "." and "..". Stop PSFTP failing an assertion when that happens. file: [9010b03d4e] check-in: [36569ee0d2] user: simon branch: trunk, size: 76897 | |
|
2011-09-13
| ||
| 06:44 | Revamp of EOF handling in all network connections, pipes and other data channels. Should comprehensively fix 'half-closed', in principle, though it's a big and complicated change and so there's a good chance I've made at least one mistake somewhere. All connections should now be rigorous about propagating end-of-file (or end-of-data-stream, or socket shutdown, or whatever) independently in both directions, except in frontends with no mechanism for sending explicit EOF (e.g. interactive terminal windows) or backends which are basically always used for interactive sessions so it's unlikely that an application would be depending on independent EOF (telnet, rlogin). EOF should now never accidentally be sent while there's still buffered data to go out before it. (May help fix 'portfwd-corrupt', and also I noticed recently that the ssh main session channel can accidentally have MSG_EOF sent before the output bufchain is clear, leading to embarrassment when it subsequently does send the output). file: [9ce11d4500] check-in: [0831792ea4] user: simon branch: trunk, size: 76389 | |
|
2011-08-11
| ||
| 12:59 | Propagate file permissions in both directions in Unix pscp and psftp. I think I have to consider this to be a separate but related change to the wishlist item 'pscp-filemodes'; that was written before the Unix port existed, and referred to the ability to configure the permissions used for files copied from Windows to Unix - which is still not done. file: [ec82ad7f43] check-in: [797da58367] user: simon branch: trunk, size: 75929 | |
|
2011-07-14
| ||
| 13:52 | Post-release destabilisation! Completely remove the struct type 'Config' in putty.h, which stores all PuTTY's settings and includes an arbitrary length limit on every single one of those settings which is stored in string form. In place of it is 'Conf', an opaque data type everywhere outside the new file conf.c, which stores a list of (key, value) pairs in which every key contains an integer identifying a configuration setting, and for some of those integers the key also contains extra parts (so that, for instance, CONF_environmt is a string-to-string mapping). Everywhere that a Config was previously used, a Conf is now; everywhere there was a Config structure copy, conf_copy() is called; every lookup, adjustment, load and save operation on a Config has been rewritten; and there's a mechanism for serialising a Conf into a binary blob and back for use with Duplicate Session. User-visible effects of this change _should_ be minimal, though I don't doubt I've introduced one or two bugs here and there which will eventually be found. The _intended_ visible effects of this change are that all arbitrary limits on configuration strings and lists (e.g. limit on number of port forwardings) should now disappear; that list boxes in the configuration will now be displayed in a sorted order rather than the arbitrary order in which they were added to the list (since the underlying data structure is now a sorted tree234 rather than an ad-hoc comma-separated string); and one more specific change, which is that local and dynamic port forwardings on the same port number are now mutually exclusive in the configuration (putting 'D' in the key rather than the value was a mistake in the first place). One other reorganisation as a result of this is that I've moved all the dialog.c standard handlers (dlg_stdeditbox_handler and friends) out into config.c, because I can't really justify calling them generic any more. When they took a pointer to an arbitrary structure type and the offset of a field within that structure, they were independent of whether that structure was a Config or something completely different, but now they really do expect to talk to a Conf, which can _only_ be used for PuTTY configuration, so I've renamed them all things like conf_editbox_handler and moved them out of the nominally independent dialog-box management module into the PuTTY-specific config.c. file: [68005f3d0d] check-in: [a2c0243430] user: simon branch: trunk, size: 75543 | |
|
2011-03-01
| ||
| 17:04 | Remove an unused variable (should shut up a warning from GCC 4.6). file: [d13d5e70b3] check-in: [3fd9cd6610] user: jacob branch: trunk, size: 75386 | |
|
2009-08-06
| ||
| 19:19 | Workarounds for compiling with -D_FORTIFY_SOURCE=2 (as Ubuntu does), which doesn't like you to ignore the return value from read()/write()/etc (and apparently can't be shut up with a cast to void). file: [75deb186b7] check-in: [c1918bea98] user: jacob branch: trunk, size: 75422 | |
|
2009-04-23
| ||
| 12:39 | When giving authorisation errors from the proxy code in x11fwd.c, name the proxy using the global 'appname' variable, instead of statically calling it PuTTY. (Knock-on effect is that PSCP and PSFTP have to declare that variable, though of course they shouldn't ever actually _use_ the X forwarding code. Probably I ought to replace it with a stub nox11fwd.c for those applications.) file: [9c94edb362] check-in: [39f0cd437b] user: simon branch: trunk, size: 75395 | |
|
2008-11-24
| ||
| 12:19 | Treat lines starting with '#' as comments in PSFTP. file: [7615f33a2f] check-in: [2f3fc67a1b] user: jacob branch: trunk, size: 75357 | |
|
2008-09-16
| ||
| 07:48 | Tim Kosse points out that xfer_upload_gotpkt can return a negative value on error, so the check at the call site shouldn't test for exactly zero. file: [5daf35dcdf] check-in: [306307fcbb] user: simon branch: trunk, size: 75234 | |
|
2008-07-06
| ||
| 07:24 | Patch from Tim Kosse: check back->exitcode() in both loops on ssh_sftp_loop_iteration(), not just one. Fixes exiting on a negative response to the host key confirmation prompt on Windows (because winsftp.c doesn't have the equivalent of uxsftp.c's no_fds_ok); on Unix it worked already but gave a suboptimal error message, which is fixed too by this patch. file: [e3f077ae8f] check-in: [69902ee8df] user: simon branch: trunk, size: 75222 | |
| 07:11 | Patch from Tim Kosse to make PSFTP remember to close files on various error conditions. file: [8b4959dcbd] check-in: [e85a6b6c59] user: simon branch: trunk, size: 75169 | |
|
2007-08-04
| ||
| 17:14 | In the file-transfer applications, which only ever use the main channel, arrange to set the SSH-2 window size to something very large. This prevents the connection stalling when the window fills up, and means that PSCP receives data _much_ faster. file: [592ce18bac] check-in: [0ce59e00b7] user: ben branch: trunk, size: 75066 | |
|
2007-04-10
| ||
| 16:46 | When we get an error writing to a local file, stop the download rather than pretending we just got -1 bytes. Not actually tested, but it looks pretty obvious. Bug reported by dking wang. file: [35ebf8e3a4] check-in: [3af8c37407] user: ben branch: trunk, size: 75039 | |
|
2007-04-02
| ||
| 03:44 | When the comments say `if we're in restart mode', the code in question should actually be conditional on restart mode! file: [74516335c0] check-in: [1efe703050] user: simon branch: trunk, size: 75026 | |
|
2006-10-22
| ||
| 15:19 | Spotted by Tim Kosse: we were returning an incorrect path in canonify() when we couldn't get any sense out of the server. file: [1e0b6cfdd3] check-in: [a809c336dd] user: jacob branch: trunk, size: 74482 | |
|
2006-08-27
| ||
| 03:03 | The `socket' function in the backends is only ever checked to see if it's NULL. Since we already have one back end (uxpty) which doesn't in fact talk to a network socket, and may well have more soon, I'm replacing this TCP/IP-centric function with a nice neutral `connected' function returning a boolean. Nothing else about its semantics has currently changed. file: [8e7df0ca34] check-in: [32affe9699] user: simon branch: trunk, size: 74353 | |
|
2006-08-26
| ||
| 05:17 | On cleanup, PSCP and PSFTP should explicitly check that the back end is still running rather than relying on ssh_sftp_loop_iteration() to return a bogus value. file: [ad256564c5] check-in: [3f40f538fa] user: simon branch: trunk, size: 74363 | |
|
2006-08-12
| ||
| 10:20 | Large file support for psftp and pscp on both Windows and Unix. On Unix we set _FILE_OFFSET_BITS to 64 on the compiler command line (via mkfiles.pl), and on Windows we use SetFilePointer and GetFileSize to cope with 64-bit sizes where possible. Not tested on Win9x. file: [eee9dff295] check-in: [ec84bb61b9] user: owen branch: trunk, size: 74328 | |
|
2006-04-13
| ||
| 16:18 | Everywhere we print an fxp_error(), try to make it clear what we were trying to do at the time. (A lot of these say just "canonify:". This isn't a nice thing to show to a user, but I don't believe canonify() will ever return failure due to a server error, so users shouldn't actually see it, and it means we have a chance of tracing it if reported.) file: [349e6ba2a2] check-in: [5196811374] user: jacob branch: trunk, size: 74045 | |
|
2006-04-07
| ||
| 16:42 | Remove login name prompt from PSFTP. ssh.c will prompt for a login name as required, and doing so in psftp.c before we've even made a connection is incorrect wrt `bypass-ssh2-userauth'. file: [ebeac1ccb8] check-in: [daea38aac5] user: jacob branch: trunk, size: 73924 | |
|
2006-02-19
| ||
| 06:52 | Fix up documentation/usage messages for r6572. file: [aa262113e0] check-in: [82ba29d738] user: jacob branch: trunk, size: 74523 | |
|
2005-10-30
| ||
| 14:24 | Revamp SSH authentication code so that user interaction is more abstracted out; replace loops structured around a single interaction per loop with less tortuous code (fixes: `ki-multiprompt-crash', `ssh1-bad-passphrase-crash'; makes `ssh2-password-expiry' and `proxy-password-prompt' easier). The new interaction abstraction has a lot of fields that are unused in the current code (things like window captions); this is groundwork for `gui-auth'. However, ssh.c still writes directly to stderr; that may want to be fixed. In the GUI apps, user interaction is moved to terminal.c. This should make it easier to fix things like UTF-8 username entry, although I haven't attempted to do so. Also, control character filtering can be tailored to be appropriate for individual front-ends; so far I don't promise anything other than not having made it any worse. I've tried to test this fairly exhaustively (although Mac stuff is untested, as usual). It all seems to basically work, but I bet there are new bugs. (One I know about is that you can no longer make the PuTTY window go away with a ^D at the password prompt; this should be fixed.) file: [5497cad5a4] check-in: [fa1347493a] user: jacob branch: trunk, size: 74420 | |
|
2005-06-08
| ||
| 10:14 | Double-free on mkdir error, spotted by Brian Hartsock. file: [1e9261beba] check-in: [9021e82fe5] user: jacob branch: trunk, size: 73878 | |
|
2005-03-18
| ||
| 20:26 | Try to make our PGP signing more useful: * All the PuTTY tools for Windows and Unix now contain the fingerprints of the Master Keys. The method for accessing them is crude but universal: a new "-pgpfp" command-line option. (Except Unix PuTTYgen, which takes "--pgpfp" just to be awkward.) * Move the key policy discussion from putty-website/keys.html to putty/doc/pgpkeys.but, and autogenerate the former from the latter. Also tweak the text somewhat and include the fingerprints of the Master Keys themselves. (I've merged the existing autogeneration scripts into a single new one; I've left the old scripts and keys.html around until such time as the webmonster reviews the changes and plumbs in the new script; he should remove the old files then.) file: [455311f2b1] check-in: [d2a830c19a] user: jacob branch: trunk, size: 73895 | |
|
2005-03-10
| ||
| 10:36 | Consistently use a single notation to refer to SSH protocol versions, as discussed. Use Barrett and Silverman's convention of "SSH-1" for SSH protocol version 1 and "SSH-2" for protocol 2 ("SSH1"/"SSH2" refer to ssh.com implementations in this scheme). <http://www.snailbook.com/terms.html> file: [95e72369a9] check-in: [59a5e883d1] user: jacob branch: trunk, size: 73714 | |
|
2005-01-01
| ||
| 10:43 | Localise "not connected to a host" messages. file: [50cedd5a19] check-in: [2497e12c47] user: jacob branch: trunk, size: 73713 | |
| 10:35 | Now that rm, mkdir, and rmdir can operate on lots of files, make them more chatty like the other multiple-file commands. file: [3197a9d9dd] check-in: [4363630adb] user: jacob branch: trunk, size: 74165 | |
| 10:16 | Document recent changes to PSFTP (and other documentation tweaks). file: [25f36c23bd] check-in: [87aa86cb7f] user: jacob branch: trunk, size: 74053 | |
| 08:06 | Remove rogue sfree()s inside new wildcard action functions -- were causing segfaults in failure cases. file: [28af5fc738] check-in: [394dfda4b4] user: jacob branch: trunk, size: 73531 | |
| 07:01 | There's always one: fix small memory leak introduced in last revision. file: [e77fc8d4ce] check-in: [becb9e9fd7] user: simon branch: trunk, size: 73576 | |
| 06:34 | "Nirwana Nirwana" points out that mget, mput and ls are not the only PSFTP commands that can make good use of wildcards! Now implemented wildcard support in rmdir, rm, mv and chmod. file: [54705874c4] check-in: [cb00dfec44] user: simon branch: trunk, size: 73527 | |
|
2004-12-30
| ||
| 10:45 | Integrate unfix.org's IPv6 patches up to level 10, with rather a lot of polishing to bring them to what I think should in principle be release quality. Unlike the unfix.org patches themselves, this checkin enables IPv6 by default; if you want to leave it out, you have to build with COMPAT=-DNO_IPV6. I have tested that this compiles on Visual C 7 (so the nightlies _should_ acquire IPv6 support without missing a beat), but since I don't have IPv6 set up myself I haven't actually tested that it _works_. It still seems to make correct IPv4 connections, but that's all I've been able to verify for myself. Further testing is needed. file: [3efa870010] check-in: [99d7fec46d] user: simon branch: trunk, size: 70987 | |
| 07:51 | I've decided that trying to do wildcards in PSFTP as a special case of directory recursion was a strategic error: it obfuscates sftp_{get,put}_file(), and also it makes it very hard to handle subdirectory wildcards such as `foo/*'. Accordingly, here's a completely different approach, in which sftp_{get,put}_file() are still responsible for directory recursion, but wildcards are expanded in sftp_general_{get,put}() before being passed thereto. Subdirectory wildcards are now handled consistently across Unix, Windows and the remote server. file: [171494446e] check-in: [46c1373c46] user: simon branch: trunk, size: 70932 | |
|
2004-12-18
| ||
| 04:46 | Missed options off mput help file: [e4ff1e909e] check-in: [8b8fc6fa16] user: jacob branch: trunk, size: 67409 | |
|
2004-12-17
| ||
| 07:39 | The xfer mechanism wasn't gracefully terminating when an error was encountered part way through transfer. In particular, this caused psftp to hang (waiting for FXP_READ replies which had already arrived) if you try `get' (without -r) on a remote directory. file: [a03249f48e] check-in: [9b4c7b154a] user: simon branch: trunk, size: 67395 | |
| 06:15 | Update online help for "-r" and "--" options to get/put commands. Use command name in error messages rather than hardcoded "get:"/"put:". file: [eee4c28bab] check-in: [ce3882214d] user: jacob branch: trunk, size: 67336 | |
|
2004-12-16
| ||
| 13:36 | General mechanism for ensuring a dodgy SFTP server can't return malicious filenames via FXP_READDIR. file: [4e666b8edb] check-in: [c846e64623] user: simon branch: trunk, size: 66705 | |
| 13:19 | 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. file: [477e0403bd] check-in: [54f8df664d] user: simon branch: trunk, size: 66592 | |
| 13:15 | 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. file: [cee27a9166] check-in: [7f1a80cc9d] user: simon branch: trunk, size: 65988 | |
| 11:45 | Wildcards in `ls'. I think that completes `psftp-multi'. Woo! file: [e71e9e6f2e] check-in: [23bacbfd9f] user: simon branch: trunk, size: 65940 | |
| 11:35 | Implement mget and mput in PSFTP, supporting wildcards. file: [b54b4e8ca8] check-in: [292ea1d038] user: simon branch: trunk, size: 65257 | |
| 10:37 | Support for recursive file transfer in PSFTP. file: [9c53a63934] check-in: [8d0de62bb0] user: simon branch: trunk, size: 62038 | |
|
2004-11-27
| ||
| 07:20 | 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). file: [431a8c7d3c] check-in: [683ee6bed3] user: simon branch: trunk, size: 53072 | |
|
2004-11-19
| ||
| 15:24 | Make PSFTP use console_get_line() to fetch username, so that that prompt is affected by `-batch'. file: [1663b9b921] check-in: [26e5debddb] user: jacob branch: trunk, size: 53365 | |
|
2004-09-21
| ||
| 11:49 | `ampersat-in-username': tweak `strchr' to `strrchr' where necessary to consistently support usernames containing `@'. file: [43cb67f189] check-in: [b6d76d9903] user: jacob branch: trunk, size: 53358 | |
|
2004-07-28
| ||
| 06:04 | Another wart in the command-line processing: if the user just specifies `-load sessname', and that mentions a hostname, that should be sufficient to start a connection. file: [a2b1367e0f] check-in: [99ccf1dbe3] user: jacob branch: trunk, size: 53357 | |
|
2004-07-25
| ||
| 11:10 | PSFTP was ignoring `-1' and `-2' and always using SSH-2 with fallback to SSH-1. It also ignored any settings forbidding fallback to SSH-1. Ignoring `-1' and `-2' is hardly the end of the world, as it'd be difficult to think of a realistic situation where fallback didn't do the right thing and PSFTP was still useful. However, ignoring a user's `SSH-2 only' setting was a bit rude. file: [c38d7de59c] check-in: [3a402d8dab] user: jacob branch: trunk, size: 53062 | |
| 09:00 | Fix for `psftp-pscp-ignore-load': Default Settings is now loaded before "-load" is processed so that it doesn't clobber it. I've also changed the semantics of "-load" slightly for PSCP, PSFTP, and Plink: if it's specified at all, it overrides (disables) the implicit loading of session details based on a supplied hostname elsewhere (on the grounds that the user is more likely to want the "-load" session than the implicit session). (PuTTY itself doesn't do implicit loading at all, so I haven't changed it.) This means that all the PuTTY tools' behaviour is now consistent iff "-load" is specified (otherwise, some tools have implicit-session, and others don't). However, I've not documented this behaviour, as there's a good chance it will be swept away if and when we get round to sorting out how we deal with settings from multiple sources. It's intended as a "do something sensible" change. file: [2a82160c1b] check-in: [81963a938a] user: jacob branch: trunk, size: 52786 | |
|
2004-06-20
| ||
| 12:07 | Add a configuration option for TCP keepalives (SO_KEEPALIVE), default off. No very good reason, but I've occasionally wanted to frob it to see if it makes any difference to problems I'm having, and it was easy. Tested that it does actually cause keepalives on Windows (with tcpdump); should also work on Unix. Not implemented on Mac (does nothing), but then neither is TCP_NODELAY. Quite a big checkin, much of which is adding `keepalive' alongside `nodelay' in network function calls. file: [dbbe2e0ce3] check-in: [d6cbea6730] user: jacob branch: trunk, size: 52132 | |
|
2004-04-27
| ||
| 07:31 | Various tweaks to header comments to remind me which bits are meant to be platform-independent, etc. file: [46bb38ee9a] check-in: [9bda77c20e] user: jacob branch: trunk, size: 52104 | |
|
2004-04-17
| ||
| 15:25 | Add -V for version information to plink, pscp, and psftp. file: [3c8e4d6707] check-in: [f304a84750] user: owen branch: trunk, size: 52081 | |
|
2004-02-22
| ||
| 08:57 | Correct slightly misleading usage file: [00331635e0] check-in: [ddafdba3a3] user: jacob branch: trunk, size: 51888 | |
|
2004-01-21
| ||
| 13:56 | Darryl L. Miles's patch to support an optional port number argument on the PSFTP `open' command; it was arguably a bug that this command couldn't do such an obvious thing that could be done from the main command line. Also had to fix a NULL-dereference in do_sftp_cleanup in the process. file: [6bd2af865b] check-in: [84e5eca94f] user: simon branch: trunk, size: 51886 | |
| 13:45 | Theo Markettos's unsigned-vs-signed-char pedantry patch. file: [8037bafc78] check-in: [d58f7637c1] user: simon branch: trunk, size: 51660 | |
|
2003-12-19
| ||
| 06:44 | Joe Yates's memory leak patches. file: [7e9ccbf8f5] check-in: [e9b1098ae1] user: simon branch: trunk, size: 51678 | |
|
2003-12-03
| ||
| 17:25 | Spotted by Tim Kosse: reput on an already complete file was hanging. Should be fixed now (we only wait for packets if we know there are some that haven't been replied to yet). file: [f55fbbb338] check-in: [55d3234383] user: jacob branch: trunk, size: 50966 | |
|
2003-10-12
| ||
| 08:16 | Remove all the "assert(len>0)" which forbade zero-length writes across the from_backend() interface, after having made all implementations safe against being called with len==0 and possibly-NULL/undefined "data". (This includes making misc.c:bufchain_add() more robust in this area.) Assertion was originally added 2002-03-01; e.g., see plink.c:1.53 [r1571]. I believe this now shouldn't break anything. This should hopefully make `ppk-empty-comment' finally GO AWAY. (Tested with Unix PuTTY.) file: [8a482b534b] check-in: [5ec3c6472e] user: jacob branch: trunk, size: 50929 | |
|
2003-09-29
| ||
| 10:39 | Obvious memory leak in new fast download management. Oops. file: [f330a9fe49] check-in: [25ccd57cf4] user: simon branch: trunk, size: 50918 | |
|
2003-09-28
| ||
| 09:24 | Uploads turn out to be much easier than downloads, so here's faster upload support in PSFTP as well. file: [0086dfe285] check-in: [f977cd8508] user: simon branch: trunk, size: 50899 | |
|
2003-09-27
| ||
| 12:52 | First cut at speeding up SFTP. Generic download-management code in sftp.c, and psftp.c now uses that instead of going it alone. Should in principle be easily installed in PSCP as well, but I haven't done it yet; also it only handles downloads, not uploads, and finally it doesn't yet properly calculate the correct number of parallel requests to queue. Still, it's a start, and in my own tests it seemed to perform as expected (download speed suddenly became roughly what you'd expect from the available bandwidth, and decreased by roughly the expected number of round-trip times). file: [6f5466a1a9] check-in: [98245922c2] user: simon branch: trunk, size: 50805 | |
|
2003-08-24
| ||
| 08:22 | And just to prove that psftp.c really is now platform-independent ... here's a Unix port of PSFTP. Woo. (Oddly PSCP looks to be somewhat harder; there's more Windows code interleaved than there was in PSFTP.) file: [8f12af869f] check-in: [a9746849d8] user: simon branch: trunk, size: 50753 | |
| 07:47 | Next phase of general SFTP reworking: psftp.c is now a platform- independent source file. All Windowsisms have been moved out to winsftp.c. file: [d426aa024c] check-in: [cf9dbdd668] user: simon branch: trunk, size: 50673 | |
|
2003-06-29
| ||
| 09:47 | Phase 1a of SFTP re-engineering: fix the glaring memory and request ID leak in the previous checkin. Oops :-) file: [b0579fe677] check-in: [0180a6b327] user: simon branch: trunk, size: 52414 | |
| 09:26 | First phase of SFTP re-engineering. Each base-level fxp_* function has been split into a send half and a receive half, so that callers can set several requests in motion at a time and deal with the responses in whatever order they arrive. file: [afd1c2bd01] check-in: [b9024f3254] user: simon branch: trunk, size: 52270 | |
|
2003-05-04
| ||
| 09:18 | Colin's const-fixing Patch Of Death. Seems to build fine on Windows as well as Unix, so it can go in. file: [cf8b8d8500] check-in: [c9f1945192] user: simon branch: trunk, size: 48371 | |
|
2003-04-28
| ||
| 08:59 | Asynchronous agent requests on Windows. Actually, I've kept the ability to do synchronous ones as well, because PSCP and PSFTP don't really need async ones and it would have been a serious pain to implement them. Also, Pageant itself when run as a client of its primary instance doesn't benefit noticeably from async agent requests. file: [b637754c7a] check-in: [e54332edd4] user: simon branch: trunk, size: 48365 | |
|
2003-03-29
| ||
| 10:14 | Introduced wrapper macros snew(), snewn() and sresize() for the malloc functions, which automatically cast to the same type they're allocating the size of. Should prevent any future errors involving mallocing the size of the wrong structure type, and will also make life easier if we ever need to turn the PuTTY core code from real C into C++-friendly C. I haven't touched the Mac frontend in this checkin because I couldn't compile or test it. file: [308023df15] check-in: [48c3c19745] user: simon branch: trunk, size: 48092 | |
|
2003-02-01
| ||
| 11:24 | Oops, Ben is quite right about the rather appalling design of filename_from_str. Here's a better fix, with some const repercussions too. file: [b15d243684] check-in: [f8d33b50cd] user: simon branch: trunk, size: 48189 | |
|
2003-01-21
| ||
| 13:18 | Fix "-v" in the Windows console utilities (plink, pscp, psftp). I'm not convinced I've done this the right way (I've introduced a static for logctx in console.c) but it will do for now. file: [779c32cb7b] check-in: [de3e01d206] user: jacob branch: trunk, size: 48183 | |
|
2003-01-12
| ||
| 09:32 | Having laid all the groundwork, we can now remove the global `cfg' completely from putty.h. It's now static in each of the command-line front ends, shared only between window.c and windlg.c in PuTTY proper (I've tested this by doing #define cfg cfgsillyname in those two files only, and it still links so nobody else is using that symbol!), and part of the `inst' structure in pterm. I think that only leaves the Unicode module as the last stubborn holdout in the anti-global-variables campaign. file: [e866297349] check-in: [c3e7c65a17] user: simon branch: trunk, size: 48147 | |
| 09:10 | The logging module now contains a local copy of cfg too. file: [286bcaa2b7] check-in: [425e784a06] user: simon branch: trunk, size: 48128 | |
| 08:48 | The back ends now contain their own copies of the Config structure, and have a function to pass in a new one. (Well, actually several back ends don't actually bother to do this because they need nothing out of Config after the initial setup phase, but they could if they wanted to.) file: [0a53cf51f5] check-in: [f4d72755c1] user: simon branch: trunk, size: 48122 | |
| 08:17 | The command-line routines now take a pointer to `cfg' as an argument, so they don't depend on it being a global any more. file: [fb9b924099] check-in: [5c4ededf67] user: simon branch: trunk, size: 48117 | |
|
2002-12-15
| ||
| 07:25 | Fixing trivial warnings spotted by Mingw-2.0.0/gcc-3.2: psftp.c: In function `sftp_cmd_chmod': psftp.c:835: warning: too many arguments for format file: [03fede6d3f] check-in: [4bac67db09] user: jacob branch: trunk, size: 48107 | |
|
2002-11-20
| ||
| 14:09 | Fixes for more robust handling of command-line parse errors. file: [9ced94da09] check-in: [7ee5329b06] user: simon branch: trunk, size: 48114 | |
|
2002-11-07
| ||
| 13:49 | Robustness fixes for KEXINIT handling and others. In particular, I've created a self-mallocing variant of sprintf, to obviate any future need for paranoid %.100s type stuff in format strings. file: [7b60f36e0d] check-in: [c58e86fe39] user: simon branch: trunk, size: 47994 | |
|
2002-11-03
| ||
| 02:46 | Half of Lars Gunnarsson's iXplorer compatibility patch: the PSFTP login prompt should be fflushed (presumably fgets fails to implicitly do this when stdin and stdout are redirected weirdly). file: [181cfd4080] check-in: [989155997f] user: simon branch: trunk, size: 48048 | |
|
2002-10-26
| ||
| 07:58 | 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. file: [1ad57b6718] check-in: [8fba443d8c] user: simon branch: trunk, size: 48031 | |
| 05:33 | 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! file: [4d16eca85e] check-in: [06cff2eb6c] user: simon branch: trunk, size: 47940 | |
|
2002-10-25
| ||
| 06:30 | 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. file: [a7e8b8fea1] check-in: [92e8b2cec5] user: simon branch: trunk, size: 47879 | |
|
2002-10-22
| ||
| 11:11 | 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? file: [bd3d93aa76] check-in: [c56a5fa8ee] user: simon branch: trunk, size: 47822 | |
|
2002-10-16
| ||
| 06:35 | Fix for `hostname-whitespace'; thanks to Justin Bradford. file: [bfaab6e816] check-in: [39093dcc64] user: simon branch: trunk, size: 47800 | |
|
2002-10-09
| ||
| 13:09 | First phase of porting. pterm now compiles and runs under Linux+gtk. The current pty.c backend is temporarily a loopback device for terminal emulator testing, the display handling is only just enough to show that terminal.c is functioning, the keyboard handling is laughable, and most features are absent. Next step: bring output and input up to a plausibly working state, and put a real pty on the back to create a vaguely usable prototype. Oh, and a scrollbar would be nice too. In _theory_ the Windows builds should still work fine after this... file: [7ee76c3b4d] check-in: [2d8039929a] user: simon branch: trunk, size: 47523 | |
|
2002-10-07
| ||
| 12:31 | Fix pscp-cmdline-port-bug for PSFTP too. (Also removes what appears to be a gratuitous re-implementation of the "-l user" option.) file: [c3a3af0c30] check-in: [17d1c99570] user: jacob branch: trunk, size: 47231 | |
|
2002-09-11
| ||
| 12:30 | Updated usage messages for command-line utilities to reflect new options. Updated manual to reflect reality (e.g. usage messages, '-p port' not actually implemented, sprinkle references to '-i keyfile'). (I've put "Release 0.53" in the messages; let's hope this doesn't cause a flood of "where is 0.53?" email.) I don't guarantee that the result is entirely sane and sensible in all respects, but it is at least consistent. file: [d43d5e442c] check-in: [8165c812b8] user: jacob branch: trunk, size: 47165 | |
|
2002-08-04
| ||
| 16:18 | Revamp of command-line handling. Most command line options should now be processed in cmdline.c, which is called from all utilities (well, not Pageant or PuTTYgen). This should mean we get to standardise almost all options across almost all tools. Also one major change: `-load' is now the preferred option for loading a saved session in PuTTY proper. `@session' still works but is deprecated. file: [8675219b00] check-in: [6e2207da2f] user: simon branch: trunk, size: 46788 | |
|
2002-03-31
| ||
| 10:26 | Fix major memory leak in sftp_cmd_ls (thanks to Hans-Juergen Petrich for pointing it out). file: [708bb0b6a5] check-in: [d8cae6eb26] user: simon branch: trunk, size: 46329 | |
|
2002-03-06
| ||
| 14:13 | Ensure our network layer is properly cleaned up before PuTTY exits. Specifically, we explicitly closesocket() all open sockets, which appears to be necessary since otherwise Windows sends RST rather than FIN. I'm _sure_ that's a Windows bug, but there we go. file: [79ec723dac] check-in: [c483e38b9f] user: simon branch: trunk, size: 46278 | |
|
2002-03-01
| ||
| 07:17 | from_backend() should always be called with len > 0. Only rlogin mode ever failed to do this, and only Plink actually had a problem with it, so this didn't become obvious for a while. rlogin mode is fixed, and all implementations of from_backend() now contain an assertion so that we should spot errors of this type more quickly in future. file: [2da164b241] check-in: [30d5735d86] user: simon branch: trunk, size: 46230 | |
|
2002-02-27
| ||
| 16:30 | Oops - get the forward declaration right in that hack file: [bc5553fe38] check-in: [b913c2b62b] user: simon branch: trunk, size: 46208 | |
| 16:20 | Fix silly segfault due to PSFTP thinking connection is fine even if fxp_init() fails to get initial packet. file: [e9ce9fec77] check-in: [941e10e2d6] user: simon branch: trunk, size: 46209 | |
|
2001-12-31
| ||
| 10:15 | Create the long-awaited console.c, and move the common routines out of scp.c, psftp.c and plink.c into it. Additionally, add `batch mode', in which all the interactive prompts (bad host key, log file exists, insecure cipher, password prompt) are disabled and safe responses are assumed. (The idea being that if you run PSCP, for example, in a cron job then you'd probably rather it failed and exited instead of leaving the cron job wedged while it waits for user input that will never arrive.) file: [8519f471db] check-in: [9ce037d3b4] user: simon branch: trunk, size: 46153 | |
|
2001-12-20
| ||
| 08:19 | Oops - fputs takes the file pointer second, not first! file: [188e0f1588] check-in: [c4cb5ff3d0] user: simon branch: trunk, size: 52409 | |
|
2001-12-19
| ||
| 12:49 | The alphabetical ordering in the psftp command list was broken. D'oh! file: [680f4a95ae] check-in: [e9b47a6384] user: simon branch: trunk, size: 52409 | |
|
2001-12-16
| ||
| 07:33 | Add the `local' command set to PSFTP: lcd, lpwd, and ! to spawn a Windows command. file: [f180fcc8ad] check-in: [5daa0dc7f9] user: simon branch: trunk, size: 52409 | |
|
2001-12-14
| ||
| 08:57 | Retired the #ifdef DUMP_PACKETS stuff in ssh.c because I'm utterly sick of recompiling to enable packet dumps. SSH packet dumping is now provided as a logging option, and dumps to putty.log like all the other logging options. While I'm at it I cleaned up the format so that packet types are translated into strings for easy browsing. POSSIBLE SIDE EFFECT: in the course of this work I had to re-enable the SSH1 packet length checks which it turns out hadn't actually been active for some time, so it's possible things might break as a result. If need be I can always disable those checks for the 0.52 release and think about it more carefully later. file: [0b632c5144] check-in: [94f359321d] user: simon branch: trunk, size: 49721 | |
| 04:06 | Fix trivial problems with PSFTP batch mode file: [52f492cebe] check-in: [47214a0fdc] user: simon branch: trunk, size: 48614 | |
|
2001-12-13
| ||
| 13:26 | Tidied up PSFTP batch mode. The gross hack using fxp_error_message to report command failures is now gone; instead each sftp_cmd_* routine returns 0 or 1 depending on success, like they should have done right from the start. This fixes problems with `ls' prematurely terminating PSFTP batch files. file: [78bef93bfc] check-in: [f0cba4ce69] user: simon branch: trunk, size: 48608 | |
| 12:42 | Allow PSFTP to be run with no arguments, in which case it enters the command-line state but all commands are disallowed except `open host.name'. The idea is to provide marginal extra niceness for people who double-click the icon without realising it's a cmdline app. file: [db28a0c2c3] check-in: [3d26f9c83f] user: simon branch: trunk, size: 48402 | |
|
2001-11-29
| ||
| 15:47 | Configurable TCP_NODELAY option on network connections file: [c1b3ada7fa] check-in: [8daaf4c09d] user: simon branch: trunk, size: 46137 | |
|
2001-11-25
| ||
| 08:31 | INCOMPATIBLE CHANGE to the SSH2 private key file format. There is now a passphrase-keyed MAC covering _all_ important data in the file, including the public blob and the key comment. Should conclusively scupper any attacks based on nobbling the key file in an attempt to sucker the machine that decrypts it. MACing the comment field also protects against a key-substitution attack (if someone's worked out a way past our DSA protections and can extract the private key from a signature, swapping key files and substituting comments might just enable them to get the signature they need to do this. Paranoid, but might as well). file: [cbf8735de6] check-in: [33213fd301] user: simon branch: trunk, size: 46134 | |
|
2001-10-30
| ||
| 15:45 | The other utilities should do the same processing of the hostname (parsing `user@' prefixes etc) that PuTTY proper does. file: [c95fd2bb78] check-in: [0196b546dc] user: simon branch: trunk, size: 45578 | |
|
2001-09-19
| ||
| 15:07 | Fix pasting of newlines in local line editing mode. Possibly not a very _good_ fix; something might want doing after the release. file: [a80efde1ec] check-in: [a8202e3593] user: simon branch: trunk, size: 44856 | |
|
2001-09-12
| ||
| 15:16 | PSFTP: when choosing a default destination filename for `get' and `put', it makes more sense to pick the _basename_ of the source rather than use the whole path - particularly when the latter might cause us to try to use a DOS pathname like `f:\stuff' in a Unix (or worse, such as VMS!) file system. file: [0e351fc1bc] check-in: [3c7affa792] user: simon branch: trunk, size: 44839 | |
| 15:11 | psftp and pscp should disable all forwarding (ports, X, agent). Partly because that's a good idea _anyway_, and partly because it seems to be causing trouble. (Specifically, their pathetic attempt to emulate plink's proper select handling seems to get confused when the back end tries to open a local listening socket.) file: [ba1eb95cae] check-in: [0c4becfc0b] user: simon branch: trunk, size: 44387 | |
|
2001-09-09
| ||
| 11:31 | Add the `pwd' command in PSFTP. file: [01e5a53137] check-in: [04e99e0157] user: simon branch: trunk, size: 44125 | |
| 11:29 | Add online help in PSFTP. file: [c02938e4b1] check-in: [4649be3d6e] user: simon branch: trunk, size: 43804 | |
| 05:41 | psftp is an interactive program and the ssh.c flags should reflect this (so we get login banners and a little more verbosity during authentication). file: [a91df943fa] check-in: [ab17da4566] user: simon branch: trunk, size: 37614 | |
|
2001-09-05
| ||
| 14:58 | Better yet, look for sftp-server on the user's PATH as well, which allows individual users with shell access to install it without reference to the admin. file: [6092ad6a36] check-in: [cceb7429f9] user: simon branch: trunk, size: 37595 | |
| 14:48 | PSFTP will now attempt to find /usr/[local]/lib/sftp-server if it can't start the sftp subsystem. This should enable convenient sftp access to SSH1-only systems: all the admin needs is to install sftp-server in the right place. file: [9b7d45da64] check-in: [f83397733c] user: simon branch: trunk, size: 37448 | |
|
2001-08-26
| ||
| 10:31 | Further tightening up in PSCP. Fixed a couple more holes whereby a malicious SCP server could have written to areas other than the ones the user requested; cleared up buffer overruns everywhere. Hopefully we now do not use arbitrary buffer limits _anywhere_. file: [d30256fffb] check-in: [0963d65406] user: simon branch: trunk, size: 36569 | |
| 06:35 | More upgrades to psftp: it now supports mv, chmod, reget and reput. file: [5aa544378d] check-in: [eb0b3ce73c] user: simon branch: trunk, size: 37331 | |
|
2001-08-25
| ||
| 14:33 | Jacob's patch for a drag-list to select SSH ciphers. Heavily hacked by me to make the drag list behaviour slightly more intuitive. WARNING: DO NOT LOOK AT pl_itemfrompt() IF YOU ARE SQUEAMISH. file: [0408dd1d3c] check-in: [fb691d08cf] user: simon branch: trunk, size: 29233 | |
| 12:09 | 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). file: [a3b7f66c9d] check-in: [e84a3c910c] user: simon branch: trunk, size: 28180 | |
|
2001-08-04
| ||
| 09:19 | Patch to PSFTP: implement mkdir, rmdir, rm and scripting. Still to do: wildcards, chmod, mv, probably other things. file: [dc5c7a63e2] check-in: [4277930ada] user: simon branch: trunk, size: 27936 | |
|
2001-05-13
| ||
| 09:11 | The host-key-unknown prompt now offers the same three options as the host-key-changed prompt: update-cache-and-connect, connect-without- updating-cache, and abandon-connection. (Previously the middle one was missing.) file: [d9203db6fb] check-in: [f44e289959] user: simon branch: trunk, size: 25312 | |
|
2001-05-06
| ||
| 09:35 | Run entire source base through GNU indent to tidy up the varying coding styles of the various contributors! Woohoo! file: [17b09b38cb] check-in: [18fcbbf5a2] user: simon branch: trunk, size: 25064 | |
|
2001-03-12
| ||
| 09:31 | ssh_get_password has become ssh_get_line, so it can handle usernames as well. This should fix the multiple-reads-on-stdin bug in plink. file: [e8f6a62be7] check-in: [fa069c172a] user: simon branch: trunk, size: 26191 | |
|
2001-03-01
| ||
| 05:49 | Fix a potential segfault file: [eee97adc4e] check-in: [304e70314e] user: simon branch: trunk, size: 26070 | |
|
2001-02-27
| ||
| 03:11 | Patches to prevent a couple of silly crashes file: [6b0579f7b2] check-in: [373c05b772] user: simon branch: trunk, size: 26093 | |
|
2001-02-26
| ||
| 10:39 | Moderately evil workaround to compensate for a variation in behaviour of FXP_REALPATH. (Specifically, BSD and GNU realpath(3) disagree over whether to return success when computing the realpath for a putative new file to be created in a valid directory. There's no way we can tell from (say) the OpenSSH version string because OpenSSH might have been compiled to use the local realpath _or_ its own nonbroken one.) file: [789b41cd21] check-in: [0ec311cd06] user: simon branch: trunk, size: 26084 | |
|
2001-02-24
| ||
| 10:08 | psftp now works as part of the PuTTY suite file: [e129893012] check-in: [4ce457b44f] user: simon branch: trunk, size: 23510 | |
| 06:02 | SFTP client now successfully handles cd, ls, get and put. file: [56184fcd26] check-in: [952f067aa8] user: simon branch: trunk, size: 11820 | |
|
2001-02-23
| ||
| 12:21 | Added: First stab at an SFTP client. Currently a Unixland testing app, not integrated into PuTTY. file: [a08b889f64] check-in: [5c89fa98d9] user: simon branch: trunk, size: 10989 | |