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

19 Коммитов

Автор SHA1 Сообщение Дата
Jacob Nevins e375ba107d `ssh-log-pw-blank': known password fields are now omitted from SSH packet logs
by default (although they can be included). There's also an option to remove
session data, which is good both for privacy and for reducing the size of
logfiles.

[originally from svn r4593]
2004-10-02 00:33:27 +00:00
Jacob Nevins 088a1d37e9 Flush the logfile reasonably frequently in `printable output only' and
`all session data' modes, without completely mauling the performance, by
fflush()ing once per term_out(). If anyone complains I suppose we can
make this optional.

[originally from svn r4445]
2004-08-12 01:02:01 +00:00
Simon Tatham 6bb121ecb9 Colin's const-fixing Patch Of Death. Seems to build fine on Windows
as well as Unix, so it can go in.

[originally from svn r3162]
2003-05-04 14:18:18 +00:00
Simon Tatham d36a4c3685 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.

[originally from svn r3014]
2003-03-29 16:14:26 +00:00
Ben Harris 4f76d033d5 In xlatlognam(), use the start of the destination buffer as the destination
filename, not the end.

[originally from svn r2770]
2003-02-01 21:39:59 +00:00
Simon Tatham bd16b29a7a Oops, Ben is quite right about the rather appalling design of
filename_from_str. Here's a better fix, with some const
repercussions too.

[originally from svn r2768]
2003-02-01 17:24:27 +00:00
Simon Tatham f26b7aa0d3 Created new data types `Filename' and `FontSpec', intended to be
opaque to all platform-independent modules and only handled within
per-platform code. `Filename' is there because the Mac has a magic
way to store filenames (though currently this checkin doesn't
support it!); `FontSpec' is there so that all the auxiliary stuff
such as font height and charset and so on which is needed under
Windows but not Unix can be kept where it belongs, and so that I can
have a hope in hell of dealing with a font chooser in the forthcoming
cross-platform config box code, and best of all it gets the horrid
font height wart out of settings.c and into the Windows code where
it should be.
The Mac part of this checkin is a bunch of random guesses which will
probably not quite compile, but which look roughly right to me.
Sorry if I screwed it up, Ben :-)

[originally from svn r2765]
2003-02-01 12:54:40 +00:00
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
Ben Harris 282aee7545 Make this compile again.
[originally from svn r2570]
2003-01-12 15:42:24 +00:00
Simon Tatham 2d469ba497 The logging module now contains a local copy of cfg too.
[originally from svn r2566]
2003-01-12 15:10:27 +00:00
Simon Tatham 1b5cb7adf6 Each platform's implementation of askappend() is no longer required
to consult cfg.logxfovr, because it gets done once in logging.c.
askappend() is now called only when a question _really_ needs to be
asked of the user. Also in this checkin, cleanup_exit() in console.c
no longer consults cfg.protocol to decide whether to save the random
seed, because random_save_seed() can make that decision for itself
and do it better.

[originally from svn r2552]
2003-01-12 13:44:35 +00:00
Simon Tatham 6c34f06a71 Move the stderr output of event log messages in verbose mode to the
general logging module rather than localising it in ssh.c. This
means it should work in other protocols as well (notably Telnet,
where it might actually be useful for debugging negotiations).

[originally from svn r2360]
2002-12-19 14:24:28 +00:00
Jacob Nevins 242a4872b9 Doofus Award: logfopen is shared between SSH-packet and session-logging modes,
so of _course_ it has to be mode "wb". Restored, and added \r to all of the
SSH packet logging stuff.

[originally from svn r2289]
2002-12-08 12:10:58 +00:00
Jacob Nevins 9ee5d85169 For some reason Roman Pompejus' original logging patch opened the log in
"wb" mode. Since we were mostly writing "\n" rather than "\r\n", I've
changed it to just "w" and refunded the difference.

[originally from svn r2286]
2002-12-07 21:35:05 +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 6d0e9b205d 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...

[originally from svn r2010]
2002-10-09 18:09:42 +00:00
Simon Tatham 994aee285f Log file tinkering: copy Event Log entries into the SSH packet log,
so that when people send us a packet log they never forget to send
the Event Log alongside it :-)

[originally from svn r1960]
2002-09-15 13:21:32 +00:00
Simon Tatham 3e7e1eb9e8 Flush the log file after logging each packet (so that if we're going
to crash, we get an up-to-the-minute log of what happened just
before then).

[originally from svn r1543]
2002-01-10 19:50:07 +00:00
Simon Tatham 3ed0d44f16 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.

[originally from svn r1493]
2001-12-14 14:57:50 +00:00