diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2016-12-05 19:42:48 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2016-12-05 19:42:48 -0800 |
commit | 12d060e9af241ec88ab0d1c411c894f7ba8709a8 (patch) | |
tree | d7a0b60d28d73e2e578664bb737c38f0802f0ba3 | |
parent | 228ed87e2f4b7314e4cfb67ee462550c5f20edef (diff) | |
parent | 31d2b9cd1fd524773a098a52d58b3fc0a9329820 (diff) |
Merge branch '1.17' into proxycommand-closed-fix-789
-rw-r--r-- | ChangeLog.0 | 42 | ||||
-rw-r--r-- | ChangeLog.1 | 2928 | ||||
-rw-r--r-- | README.rst | 2 | ||||
-rw-r--r-- | dev-requirements.txt | 2 | ||||
-rw-r--r-- | paramiko/_version.py | 2 | ||||
-rw-r--r-- | paramiko/file.py | 64 | ||||
-rw-r--r-- | paramiko/primes.py | 4 | ||||
-rw-r--r-- | paramiko/proxy.py | 4 | ||||
-rw-r--r-- | paramiko/sftp_file.py | 60 | ||||
-rw-r--r-- | paramiko/transport.py | 27 | ||||
-rw-r--r-- | setup.py | 5 | ||||
-rw-r--r-- | sites/www/changelog.rst | 23 | ||||
-rw-r--r-- | sites/www/installing.rst | 30 | ||||
-rw-r--r-- | tests/test_client.py | 39 | ||||
-rwxr-xr-x | tests/test_file.py | 27 | ||||
-rwxr-xr-x | tests/test_sftp.py | 1 |
16 files changed, 216 insertions, 3044 deletions
diff --git a/ChangeLog.0 b/ChangeLog.0 deleted file mode 100644 index c151d251..00000000 --- a/ChangeLog.0 +++ /dev/null @@ -1,42 +0,0 @@ - -2003-08-24: - * implemented the other hashes: all 4 from the draft are working now - * added 'aes128-cbc' and '3des-cbc' cipher support - * fixed channel eof/close semantics -2003-09-12: version "aerodactyl" - * implemented group-exchange kex ("kex-gex") - * implemented RSA/DSA private key auth -2003-09-13: - * fixed inflate_long and deflate_long to handle negatives, even though - they're never used in the current ssh protocol -2003-09-14: - * fixed session_id handling: re-keying works now - * added the ability for a Channel to have a fileno() for select/poll - purposes, although this will cause worse window performance if the - client app isn't careful -2003-09-16: version "bulbasaur" - * fixed pipe (fileno) method to be nonblocking and it seems to work now - * fixed silly bug that caused large blocks to be truncated -2003-10-08: - * patch to fix Channel.invoke_subsystem and add Channel.exec_command - [vaclav dvorak] - * patch to add Channel.sendall [vaclav dvorak] - * patch to add Channel.shutdown [vaclav dvorak] - * patch to add Channel.makefile and a ChannelFile class which emulates - a python file object [vaclav dvorak] -2003-10-26: - * thread creation no longer happens during construction -- use the new - method "start_client(event)" to get things rolling - * re-keying now takes place after 1GB of data or 1 billion packets - (these limits can be easily changed per-session if needed) -2003-11-06: - * added a demo server and host key -2003-11-09: - * lots of changes to server mode - * ChannelFile supports universal newline mode; fixed readline - * fixed a bug with parsing the remote banner -2003-11-10: version "charmander" - * renamed SSHException -> SecshException - * cleaned up server mode and the demo server - -*** for all subsequent changes, please see 'tla changelog'. diff --git a/ChangeLog.1 b/ChangeLog.1 deleted file mode 100644 index 2fdae5a0..00000000 --- a/ChangeLog.1 +++ /dev/null @@ -1,2928 +0,0 @@ -# do not edit -- automatically generated by arch changelog -# arch-tag: automatic-ChangeLog--robey@lag.net--2003-public/secsh--dev--1.0 -# - -2005-04-18 00:53:57 GMT Robey Pointer <robey@lag.net> patch-164 - - Summary: - fix some docs - Revision: - secsh--dev--1.0--patch-164 - - remove some epydoc comments about fileno() being non-portable. - - modified files: - paramiko/channel.py - - -2005-04-18 00:30:52 GMT Robey Pointer <robey@lag.net> patch-163 - - Summary: - add SFTPClient.close() - Revision: - secsh--dev--1.0--patch-163 - - add SFTPClient.close() and add a simple little unit test for it. - - - modified files: - paramiko/sftp_client.py tests/test_sftp.py - - -2005-04-18 00:11:34 GMT Robey Pointer <robey@lag.net> patch-162 - - Summary: - avoid os.environ['HOME'] in the demos - Revision: - secsh--dev--1.0--patch-162 - - avoid using os.environ['HOME'], which will never work on windows, and - use os.path.expanduser() instead. it's semi-moot because windows doesn't - have a standard location for ssh files, but i think paramiko should set a - good example anyway. - - modified files: - demo.py demo_simple.py - - -2005-04-16 23:38:22 GMT Robey Pointer <robey@lag.net> patch-161 - - Summary: - integrated laptop work (test commit) - Revision: - secsh--dev--1.0--patch-161 - - Patches applied: - - * robey@lag.net--2003-public-master-shake/secsh--dev--1.0--base-0 - tag of robey@lag.net--2003-public/secsh--dev--1.0--patch-160 - - * robey@lag.net--2003-public-master-shake/secsh--dev--1.0--patch-1 - test commit - - * robey@lag.net--2003-public/secsh--dev--1.0--base-0 - initial import - - * robey@lag.net--2003-public/secsh--dev--1.0--patch-1 - no changes - - - modified files: - README paramiko/server.py - - new patches: - robey@lag.net--2003-public-master-shake/secsh--dev--1.0--base-0 - robey@lag.net--2003-public-master-shake/secsh--dev--1.0--patch-1 - - -2005-04-10 00:46:41 GMT Robey Pointer <robey@lag.net> patch-160 - - Summary: - 1.3 marowak - Revision: - secsh--dev--1.0--patch-160 - - bump version to 1.3 / marowak - - modified files: - Makefile README paramiko/__init__.py paramiko/transport.py - setup.py - - -2005-04-10 00:39:18 GMT Robey Pointer <robey@lag.net> patch-159 - - Summary: - clean up SFTPAttributes.__repr__ - Revision: - secsh--dev--1.0--patch-159 - - clean up SFTPAttributes repr() a bit. - - modified files: - paramiko/sftp_attr.py - - -2005-04-10 00:13:54 GMT Robey Pointer <robey@lag.net> patch-158 - - Summary: - remove ChangeLog from MANIFEST.in - Revision: - secsh--dev--1.0--patch-158 - - remove ChangeLog from the dist list. - - modified files: - MANIFEST.in - - -2005-04-06 07:24:28 GMT Robey Pointer <robey@lag.net> patch-157 - - Summary: - change SubsystemHandler/SFTPServerInterface API - Revision: - secsh--dev--1.0--patch-157 - - change the API of SubsystemHandler to accept a reference to the - ServerInstance object during construction. this will break all code - that currently creates subsystem handlers (like sftp servers) -- sorry! - - lots of little doc fixups (mostly indenting). - - modified files: - paramiko/server.py paramiko/sftp_server.py paramiko/sftp_si.py - paramiko/transport.py tests/stub_sftp.py - - -2005-03-26 05:53:00 GMT Robey Pointer <robey@lag.net> patch-156 - - Summary: - rewrite channel pipes to work on windows - Revision: - secsh--dev--1.0--patch-156 - - the pipe system i was using for simulating an os-level FD (for select) was - retarded. i realized this week that i could just use a single byte in the - pipe to signal "data is ready" and not try to feed all incoming data thru - the pipe -- and then i don't have to try to make the pipe non-blocking (which - should make it work on windows). a lot of duplicate code got removed and now - it's all going thru the same code-path on read. - - there's still a slight penalty on incoming feeds and calling 'recv' when a - pipe has been opened (by calling 'fileno'), but it's tiny. - - removed a bunch of documentation and comments about things not working on - windows, since i think they probably do now. - - - removed files: - .arch-ids/demo_windows.py.id demo_windows.py - - modified files: - MANIFEST.in README paramiko/channel.py - - -2005-03-25 20:06:56 GMT Robey Pointer <robey@lag.net> patch-155 - - Summary: - fix sending of large sftp packet sizes - Revision: - secsh--dev--1.0--patch-155 - - fix a bug where packets larger than about 12KB would cause the session to - die on platforms other than osx. turns out that on most platforms, setting a - socket timeout also causes timeouts to occur on writes (but not on osx). so - on a huge write, once the os buffers were full, paramiko would get a - socket.timeout exception when writing, and bail. - - since the timeout is primarily so we can periodically poll to see if the - session has been killed from elsewhere, do that on a timeout but otherwise - continue trying to write. large packet sizes (in sftp) should now work. - - modified files: - paramiko/transport.py - - -2005-02-28 08:06:08 GMT Robey Pointer <robey@lag.net> patch-154 - - Summary: - even better 1.2 lapras - Revision: - secsh--dev--1.0--patch-154 - - re-bump the version # to 1.2 (with a new date since i added more stuff). - add 2005 to the copyright date in a bunch of files. - - - modified files: - Makefile README demo.py demo_server.py demo_simple.py - demo_windows.py forward.py paramiko/__init__.py - paramiko/auth_transport.py paramiko/ber.py paramiko/channel.py - paramiko/common.py paramiko/dsskey.py paramiko/file.py - paramiko/kex_gex.py paramiko/kex_group1.py - paramiko/logging22.py paramiko/message.py paramiko/pkey.py - paramiko/primes.py paramiko/rsakey.py paramiko/server.py - paramiko/sftp.py paramiko/sftp_attr.py paramiko/sftp_client.py - paramiko/sftp_handle.py paramiko/sftp_server.py - paramiko/sftp_si.py paramiko/ssh_exception.py - paramiko/transport.py paramiko/util.py setup.py test.py - tests/loop.py tests/stub_sftp.py tests/test_file.py - tests/test_kex.py tests/test_message.py tests/test_pkey.py - tests/test_sftp.py tests/test_transport.py - - -2005-02-28 07:49:56 GMT Robey Pointer <robey@lag.net> patch-153 - - Summary: - tweak sftp_file write behavior on large blocks of data - Revision: - secsh--dev--1.0--patch-153 - - BufferedFile.write() wasn't correctly dealing with the possibility that the - underlying write might not write the entire data block at once (even though - the docs said it would). now that it's working, make sftp_file take - advantage of it in order to chop up blocks larger than 32kB (the max allowed - on sftp) and add a unit test for it. - - - modified files: - paramiko/file.py paramiko/sftp_file.py tests/test_sftp.py - - -2005-02-28 07:17:21 GMT Robey Pointer <robey@lag.net> patch-152 - - Summary: - little doc fixes - Revision: - secsh--dev--1.0--patch-152 - - stupid little doc fixups that didn't fit with the other patches. - - modified files: - paramiko/auth_transport.py tests/loop.py - - -2005-02-28 07:16:22 GMT Robey Pointer <robey@lag.net> patch-151 - - Summary: - fix race in transport thread startup - Revision: - secsh--dev--1.0--patch-151 - - set active=True from the methods that start the main transport thread, right - before actually starting the thread. this avoids a race where the main - thread could be started, but the original thread could wake up from the - event.wait(0.1) before the new thread actually set the transport active. - impossible, you say? no machines so slow exist? au contraire, my sad - little linux box faced this problem earlier today. - - - modified files: - paramiko/transport.py - - -2005-02-28 07:14:11 GMT Robey Pointer <robey@lag.net> patch-150 - - Summary: - when combining stderr with stdout on a channel, merge the buffers too - Revision: - secsh--dev--1.0--patch-150 - - when turning on combine-stderr mode on a channel, grab the channel lock and - feed any existing stderr buffer into the normal buffer. this should help - applications (and my unit tests) avoid races between data coming in over - stderr and setting combine-stderr. - - _send_eof is now slightly safer too, although i don't think that really fixed - anything. it just makes me feel better. - - modified files: - paramiko/channel.py - - -2005-02-28 07:09:02 GMT Robey Pointer <robey@lag.net> patch-149 - - Summary: - add thread ids to logs - Revision: - secsh--dev--1.0--patch-149 - - add a logging filter that reports the thread-id of the logger, and use - that for all paramiko logging. since thread-local stuff didn't appear - until python 2.4, i hacked up my own little version to assign incrementing - numbers to threads as they log. - - - modified files: - paramiko/channel.py paramiko/sftp.py paramiko/sftp_client.py - paramiko/sftp_server.py paramiko/transport.py paramiko/util.py - - -2005-02-26 21:12:43 GMT Robey Pointer <robey@lag.net> patch-148 - - Summary: - forgot to check in stub_sftp - Revision: - secsh--dev--1.0--patch-148 - - yikes! don't forget to check this in: needed for unit tests. - - new files: - tests/.arch-ids/stub_sftp.py.id tests/stub_sftp.py - - -2005-02-26 21:11:04 GMT Robey Pointer <robey@lag.net> patch-147 - - Summary: - 1.2 (lapras) - Revision: - secsh--dev--1.0--patch-147 - - bump version stuff to 1.2 / lapras. - - modified files: - Makefile README paramiko/__init__.py paramiko/transport.py - setup.py - - -2005-02-15 15:48:47 GMT Robey Pointer <robey@lag.net> patch-146 - - Summary: - raise better exception on empty key - Revision: - secsh--dev--1.0--patch-146 - - raise a clearer exception when trying to create an empty key. - - - modified files: - README paramiko/dsskey.py paramiko/rsakey.py - tests/test_transport.py - - -2005-02-15 15:47:02 GMT Robey Pointer <robey@lag.net> patch-145 - - Summary: - add methods for sending/receiving a channel's exit status - Revision: - secsh--dev--1.0--patch-145 - - track a channel's exit status and provide a method (recv_exit_status) to - block waiting for it to arrive. also provide a convenience method for - servers to send it (send_exit_status). add shutdown_read and shutdown_write. - fix a bug in sending window change requests. - - - modified files: - README paramiko/channel.py paramiko/transport.py - - -2005-02-06 23:32:22 GMT Robey Pointer <robey@lag.net> patch-144 - - Summary: - fix docs - Revision: - secsh--dev--1.0--patch-144 - - clean up some of the docs. - - - modified files: - README paramiko/pkey.py paramiko/sftp_attr.py - - -2005-02-06 23:30:40 GMT Robey Pointer <robey@lag.net> patch-143 - - Summary: - fix an sftp unit test - Revision: - secsh--dev--1.0--patch-143 - - fix one of the sftp unit tests to actually work. - - - modified files: - tests/test_sftp.py - - -2005-02-05 07:45:20 GMT Robey Pointer <robey@lag.net> patch-142 - - Summary: - fix windows sample script's HOME - Revision: - secsh--dev--1.0--patch-142 - - fix the HOME environ var to work on windows too. - - modified files: - demo_windows.py - - -2005-01-25 05:17:55 GMT Robey Pointer <robey@lag.net> patch-141 - - Summary: - misc logging fixes - Revision: - secsh--dev--1.0--patch-141 - - change the level of some log messages so interesting stuff gets logged at - info instead of debug. fix an oops where channels defaulted to being in - ultra debug mode, and make this mode depend on a new Transport method: - "set_hexdump". - - - modified files: - paramiko/auth_transport.py paramiko/channel.py - paramiko/sftp.py paramiko/sftp_client.py - paramiko/sftp_server.py paramiko/transport.py - - -2005-01-17 10:09:09 GMT Robey Pointer <robey@lag.net> patch-140 - - Summary: - more flexible logging - Revision: - secsh--dev--1.0--patch-140 - - some tweaks to make channels etc follow the logger setting of their parent - transport, so that setting the log channel for a paramiko transport will - cause all sub-logging to branch out from that channel. - - also, close all open file handles when the sftp server ends. - - - modified files: - paramiko/channel.py paramiko/sftp_attr.py - paramiko/sftp_client.py paramiko/sftp_handle.py - paramiko/sftp_server.py paramiko/transport.py - - -2005-01-16 21:03:15 GMT Robey Pointer <robey@lag.net> patch-139 - - Summary: - make loopback sftp tests the default - Revision: - secsh--dev--1.0--patch-139 - - change the unit tests to default to always running the sftp tests locally, - and make a -R option to force the tests to run against a remote server. - the tests seem to work fine locally, and it helps test out server mode, - even though there's a danger that they could get isolated from reality - and only test that paramiko can talk to itself. - - - modified files: - test.py - - -2005-01-16 20:14:07 GMT Robey Pointer <robey@lag.net> patch-138 - - Summary: - doc fixups - Revision: - secsh--dev--1.0--patch-138 - - little doc fixups that i did obsessively on the train one morning. - - modified files: - paramiko/file.py - - -2005-01-09 05:27:07 GMT Robey Pointer <robey@lag.net> patch-137 - - Summary: - added listdir_attr() - Revision: - secsh--dev--1.0--patch-137 - - add SFTPClient.listdir_attr() to fetch a list of files & their attributes, - instead of just their filenames. artur piwko would find this useful. - - - modified files: - paramiko/sftp_attr.py paramiko/sftp_client.py - - -2004-12-19 19:56:48 GMT Robey Pointer <robey@lag.net> patch-136 - - Summary: - loopback sftp test - Revision: - secsh--dev--1.0--patch-136 - - add ability to turn off more tests, and a secret (for now) -X option to do - the sftp tests via loopback socket. added another symlink sftp test to see - what happens with absolute symlinks. - - - modified files: - test.py tests/test_sftp.py - - -2004-12-19 19:50:00 GMT Robey Pointer <robey@lag.net> patch-135 - - Summary: - more sftp cleanup - Revision: - secsh--dev--1.0--patch-135 - - oops, this should've been part of the last patch. - - - modified files: - paramiko/sftp_si.py - - -2004-12-19 19:43:27 GMT Robey Pointer <robey@lag.net> patch-134 - - Summary: - cleanup & docs in sftp - Revision: - secsh--dev--1.0--patch-134 - - add some more docs to SFTPHandle, and give a default implementation for - close() that's usually right. add a flush() to the default implementation - of write(). document that symlink's args in the sftp protocol are out of - order (the spec is wrong). - - - modified files: - paramiko/sftp_handle.py paramiko/sftp_server.py - - -2004-12-13 07:32:14 GMT Robey Pointer <robey@lag.net> patch-133 - - Summary: - unit test madness - Revision: - secsh--dev--1.0--patch-133 - - add some more testy bits and fix up some other bits. - - - modified files: - tests/test_transport.py - - -2004-12-13 07:31:01 GMT Robey Pointer <robey@lag.net> patch-132 - - Summary: - oops (continued) - Revision: - secsh--dev--1.0--patch-132 - - er, part 2 of that. - - - modified files: - paramiko/server.py - - -2004-12-13 07:29:38 GMT Robey Pointer <robey@lag.net> patch-131 - - Summary: - move check_global_request - Revision: - secsh--dev--1.0--patch-131 - - move check_global_request into the server interface -- i missed it during - the initial move (oops). - - - modified files: - paramiko/transport.py - - -2004-12-13 07:27:39 GMT Robey Pointer <robey@lag.net> patch-130 - - Summary: - small fixups - Revision: - secsh--dev--1.0--patch-130 - - move _wait_for_send_window into the right place in Channel. remove outdated - note from auth_transport. fix download url in setup.py. - - - - modified files: - paramiko/auth_transport.py paramiko/channel.py setup.py - - -2004-12-12 09:58:40 GMT Robey Pointer <robey@lag.net> patch-129 - - Summary: - 1.1 (kabuto) - Revision: - secsh--dev--1.0--patch-129 - - edit various files to bump the version to 1.1. - also fix to point to the new url. - - - modified files: - Makefile README paramiko/__init__.py paramiko/transport.py - setup.py - - -2004-12-12 09:38:24 GMT Robey Pointer <robey@lag.net> patch-128 - - Summary: - more unit tests - Revision: - secsh--dev--1.0--patch-128 - - added unit tests for multi-part auth, exec_command, and invoke_shell. - - - modified files: - tests/test_transport.py - - -2004-12-12 09:32:17 GMT Robey Pointer <robey@lag.net> patch-127 - - Summary: - doc fixups - Revision: - secsh--dev--1.0--patch-127 - - fix some typos in sftp_client docs - - - modified files: - paramiko/sftp_client.py - - -2004-12-12 09:25:15 GMT Robey Pointer <robey@lag.net> patch-126 - - Summary: - server support for stderr & exec_command - Revision: - secsh--dev--1.0--patch-126 - - for the server side of my stderr blunder, add send_stderr & sendall_stderr, - and make the sending side of makefile_stderr work correctly. - - also, call check_channel_exec_request on a server object for exec requests - on a channel. - - - modified files: - paramiko/channel.py paramiko/server.py - - -2004-12-12 09:16:03 GMT Robey Pointer <robey@lag.net> patch-125 - - Summary: - add client-side multi-part auth support - Revision: - secsh--dev--1.0--patch-125 - - added support for multi-part authentication (even though nobody supports it - that i've seen). on a successful "partial" auth, the auth_* method will - return a list of acceptable means to continue authenticating. - - - modified files: - paramiko/auth_transport.py paramiko/ssh_exception.py - - -2004-12-11 03:44:33 GMT Robey Pointer <robey@lag.net> patch-124 - - Summary: - docs fixup - Revision: - secsh--dev--1.0--patch-124 - - fix a comment typo, and add @since designators to a couple of new methods. - - - modified files: - paramiko/channel.py paramiko/sftp_server.py - - -2004-12-11 03:43:18 GMT Robey Pointer <robey@lag.net> patch-123 - - Summary: - clean up authentication - Revision: - secsh--dev--1.0--patch-123 - - add new exception "BadAuthenticationType", which is raised when auth fails - because your auth type (password or public-key) isn't valid on the server. - - used this as an excuse to clean up auth_password and auth_publickey so their - 'event' arg is optional, and if missing, they block until auth is finished, - raising an exception on error. - - also, don't close the session on failed auth -- the server may let you try - again. - - added some test cases for failed auth. - - - modified files: - paramiko/__init__.py paramiko/auth_transport.py - paramiko/ssh_exception.py paramiko/transport.py - tests/test_transport.py - - -2004-12-10 08:30:44 GMT Robey Pointer <robey@lag.net> patch-122 - - Summary: - symlink, readlink - Revision: - secsh--dev--1.0--patch-122 - - add support for symlink command, and finish support for readlink. (i guess - i started readlink a while ago but forgot to add the right method to the - SFTPServerInterface class.) - - - modified files: - paramiko/sftp_server.py paramiko/sftp_si.py tests/test_sftp.py - - -2004-12-10 08:27:43 GMT Robey Pointer <robey@lag.net> patch-121 - - Summary: - other part of that last patch - Revision: - secsh--dev--1.0--patch-121 - - oops, forgot this part. - - modified files: - paramiko/transport.py - - -2004-12-10 08:25:28 GMT Robey Pointer <robey@lag.net> patch-120 - - Summary: - add stderr support methods - Revision: - secsh--dev--1.0--patch-120 - - big embarrassment: i didn't read the ssh2 docs close enough, and all this - time paramiko wasn't handling "extended_data" packets, which contain stderr - output. - - so now, several new functions: recv_stderr_ready() and recv_stderr() to - mirror recv_ready() and recv(), and set_combined_stderr() to force stderr - to be combined into stdout. also, makefile_stderr() to create a fake file - object to represent stderr. - - - modified files: - paramiko/channel.py - - -2004-12-10 07:55:33 GMT Robey Pointer <robey@lag.net> patch-119 - - Summary: - reformat README - Revision: - secsh--dev--1.0--patch-119 - - reformatted the README to a slightly smaller margin, just because. - - - modified files: - README - - -2004-12-09 04:15:12 GMT Robey Pointer <robey@lag.net> patch-118 - - Summary: - fix SFTPFile gettimeout/settimeout - Revision: - secsh--dev--1.0--patch-118 - - i don't think the gettimeout/settimeout calls on SFTPFile ever worked. - also, simplify the implementation of _get_size() since it's nearly - identical to stat(). - - - modified files: - paramiko/sftp_file.py - - -2004-12-09 02:42:36 GMT Robey Pointer <robey@lag.net> patch-117 - - Summary: - readme comments - Revision: - secsh--dev--1.0--patch-117 - - add another fixme to the readme - - modified files: - README - - -2004-11-26 22:07:31 GMT Robey Pointer <robey@lag.net> patch-116 - - Summary: - doc fixups - Revision: - secsh--dev--1.0--patch-116 - - explain "recv_ready" better, and add debug descriptions for the kex codes. - - - modified files: - README paramiko/channel.py paramiko/common.py - - -2004-11-25 19:39:34 GMT Robey Pointer <robey@lag.net> patch-115 - - Summary: - fix CONNECTION_FAILED_CODE - Revision: - secsh--dev--1.0--patch-115 - - oops, fix typo in channel request failed. - - modified files: - paramiko/transport.py - - -2004-11-22 07:40:39 GMT Robey Pointer <robey@lag.net> patch-114 - - Summary: - fix typo in channel - Revision: - secsh--dev--1.0--patch-114 - - fix typo that alain found: pipd_wfd -> pipe_wfd. - - - modified files: - paramiko/channel.py - - -2004-11-22 07:27:21 GMT Robey Pointer <robey@lag.net> patch-113 - - Summary: - sftp server support! - Revision: - secsh--dev--1.0--patch-113 - - finally check in sftp_handle (file handle abstraction), sftp_si (server - interface), and sftp_server (server implementation) -- all of which make - a roughly 90% implementation of server-side sftp. - - - - new files: - paramiko/.arch-ids/sftp_handle.py.id - paramiko/.arch-ids/sftp_server.py.id - paramiko/.arch-ids/sftp_si.py.id paramiko/sftp_handle.py - paramiko/sftp_server.py paramiko/sftp_si.py - - modified files: - README demo_windows.py paramiko/__init__.py - - -2004-11-22 07:07:08 GMT Robey Pointer <robey@lag.net> patch-112 - - Summary: - add finish_subsystem() - Revision: - secsh--dev--1.0--patch-112 - - when a SubsystemHandler is being decomissioned (the client has closed the - channel or transport, or the socket went away), make a callback to let the - handler do any shutdown it needs to. - - - modified files: - paramiko/server.py - - -2004-11-22 07:04:31 GMT Robey Pointer <robey@lag.net> patch-111 - - Summary: - fix extremely unlikely channel counter wrapping - Revision: - secsh--dev--1.0--patch-111 - - Transport's channel counter can overflow after 4 billion some channels are - created. make it wrap back around after 16 million instead. also allow the - logging channel to be set manually. fix some comments elsewhere. - - - modified files: - paramiko/channel.py paramiko/primes.py paramiko/transport.py - - -2004-11-22 07:01:43 GMT Robey Pointer <robey@lag.net> patch-110 - - Summary: - fix Transport.get_username() to work in server mode too - Revision: - secsh--dev--1.0--patch-110 - - whenever i split the 'username' field into username and auth_username, - i guess that made get_username() stop working for server mode (because the - username was stored in a different field). this should fix it. - - modified files: - paramiko/auth_transport.py - - -2004-11-07 03:10:53 GMT Robey Pointer <robey@lag.net> patch-109 - - Summary: - v1.0 (jigglypuff) - Revision: - secsh--dev--1.0--patch-109 - - bump all the version numbers up to 1.0 (jigglypuff). - - modified files: - Makefile README paramiko/__init__.py paramiko/transport.py - setup.py - - -2004-11-07 02:51:42 GMT Robey Pointer <robey@lag.net> patch-108 - - Summary: - add filename to SFTPAttributes - Revision: - secsh--dev--1.0--patch-108 - - add filename to the attributes stored in an SFTPAttributes object. - - modified files: - paramiko/sftp_attr.py - - -2004-11-07 02:31:48 GMT Robey Pointer <robey@lag.net> patch-107 - - Summary: - fix kex_gex - Revision: - secsh--dev--1.0--patch-107 - - fix kex_gex (group-exchange key exchange) to, *cough*, work again, and also - layout kex_group1 a little more sanely. - - modified files: - paramiko/kex_gex.py paramiko/kex_group1.py - - -2004-11-07 02:29:54 GMT Robey Pointer <robey@lag.net> patch-106 - - Summary: - fix chmod +x on demo_windows.py - Revision: - secsh--dev--1.0--patch-106 - - forgot to make demo_windows +x - - -2004-11-07 02:29:20 GMT Robey Pointer <robey@lag.net> patch-105 - - Summary: - move ChangeLog - Revision: - secsh--dev--1.0--patch-105 - - move ChangeLog out of the way because tla can autogenerate any useful - ChangeLog. - - - renamed files: - .arch-ids/ChangeLog.id - ==> .arch-ids/ChangeLog-old.id - ChangeLog - ==> ChangeLog-old - - -2004-11-07 02:28:33 GMT Robey Pointer <robey@lag.net> patch-104 - - Summary: - fix location of SFTPError - Revision: - secsh--dev--1.0--patch-104 - - fix location of SFTPError. - - modified files: - paramiko/__init__.py paramiko/sftp_client.py - - -2004-11-07 02:17:18 GMT Robey Pointer <robey@lag.net> patch-103 - - Summary: - rename sftp constants - Revision: - secsh--dev--1.0--patch-103 - - replace oddly named sftp constants (FX_OK for example) with names that make - a bit more sense when sober (SFTP_OK). - - modified files: - paramiko/__init__.py paramiko/sftp.py paramiko/sftp_client.py - - -2004-11-07 02:08:11 GMT Robey Pointer <robey@lag.net> patch-102 - - Summary: - add key exchange tests + 1 more sftp test - Revision: - secsh--dev--1.0--patch-102 - - add test suite for key-exchange protocols, since i apparently broke the - "gex" protocol recently and never noticed. also add an sftp unit test for - mkdir/rmdir. - - new files: - tests/.arch-ids/test_kex.py.id tests/test_kex.py - - modified files: - test.py tests/test_sftp.py - - -2004-11-07 02:00:50 GMT Robey Pointer <robey@lag.net> patch-101 - - Summary: - remove old demo keys - Revision: - secsh--dev--1.0--patch-101 - - the keys are in tests/ now. - - removed files: - .arch-ids/demo_dss_key.id .arch-ids/demo_rsa_key.id - demo_dss_key demo_rsa_key - - -2004-11-06 20:32:08 GMT Robey Pointer <robey@lag.net> patch-100 - - Summary: - don't forget demo_windows.py - Revision: - secsh--dev--1.0--patch-100 - - update MANIFEST.in to include demo_windows.py and not include the demo - keys (they're in tests/ now). clean up the README to explain the demo - scripts better now, since there are so many of them. then fix up the - demo scripts to look in tests/ for the keys. - - demo_windows.py doesn't need to call get_pty() (in fact, i think that's - blowing openssh's mind) and was executing the wrong command. - - - modified files: - MANIFEST.in README demo_server.py demo_simple.py - demo_windows.py - - -2004-11-01 07:07:48 GMT Robey Pointer <robey@lag.net> patch-99 - - Summary: - use getpass - Revision: - secsh--dev--1.0--patch-99 - - convert raw_input to getpass as suggested many weeks ago. - - modified files: - forward.py - - -2004-11-01 03:54:01 GMT Robey Pointer <robey@lag.net> patch-98 - - Summary: - don't unlink a Channel until the server closes it too - Revision: - secsh--dev--1.0--patch-98 - - when close()'ing a Channel, don't immediately unlink it from the Transport. - instead, wait for the server to send a close message. - - this should fix a bug where doing close() on an EOF'd channel would cause - the entire transport to be killed, because the server would send an - 'exit-status' and 'close' message for a channel that we no longer had a - record of. - - - modified files: - paramiko/channel.py - - -2004-11-01 03:43:28 GMT Robey Pointer <robey@lag.net> patch-97 - - Summary: - better debugging, improve subsytem handler - Revision: - secsh--dev--1.0--patch-97 - - add a list of ssh packet names for debugging. improve the server-mode - subsystem handler so it can take extra parameters (list or keyword) and - pass them to the subsystem constructor. remove a misleading comment - about rekeying (which was already implemented). - - - modified files: - paramiko/common.py paramiko/server.py paramiko/transport.py - - -2004-11-01 03:37:42 GMT Robey Pointer <robey@lag.net> patch-96 - - Summary: - remove key.valid check - Revision: - secsh--dev--1.0--patch-96 - - oops! 'key.valid' no longer works -- catch the SSHException instead, and log - it. - - - modified files: - paramiko/auth_transport.py - - -2004-10-23 07:36:23 GMT Robey Pointer <robey@lag.net> patch-95 - - Summary: - ivysaur 0.9 - Revision: - secsh--dev--1.0--patch-95 - - update ivysaur release date, and add the list of changes to the README - file. - - - modified files: - Makefile README paramiko/__init__.py - - -2004-10-20 16:52:51 GMT Robey Pointer <robey@lag.net> patch-94 - - Summary: - start testing Transport - Revision: - secsh--dev--1.0--patch-94 - - the beginnings of tests for Transport. only the bare minimum is there right - now. - - also started doc'ing things up to ivysaur. - - new files: - .arch-ids/demo_windows.py.id demo_windows.py - tests/.arch-ids/loop.py.id - tests/.arch-ids/test_transport.py.id tests/loop.py - tests/test_transport.py - - modified files: - Makefile README paramiko/__init__.py setup.py test.py - - -2004-10-18 04:54:27 GMT Robey Pointer <robey@lag.net> patch-93 - - Summary: - switch Transport.connect() to using a Pkey object for the host key - Revision: - secsh--dev--1.0--patch-93 - - i suddenly realized that passing "hostkeytype" and "hostkey" as strings to - Transport.connect() was pretty silly since i went to all the effort of making - a class specifically for holding keys. so Transport.connect() now just takes - host-key argument: "hostkey" as a PKey object. - - updated the demos to use PKey objects when reading the host key file, and to - use the new "hostkey" argument. - - - modified files: - demo.py demo_simple.py paramiko/pkey.py paramiko/transport.py - - -2004-09-25 22:07:59 GMT Robey Pointer <robey@lag.net> patch-92 - - Summary: - add rsa/dss key object unit tests - Revision: - secsh--dev--1.0--patch-92 - - add tests for rsa/dss key objects -- yay! - - - new files: - tests/.arch-ids/test_dss.key.id - tests/.arch-ids/test_pkey.py.id - tests/.arch-ids/test_rsa.key.id tests/test_dss.key - tests/test_pkey.py tests/test_rsa.key - - -2004-09-25 22:03:48 GMT Robey Pointer <robey@lag.net> patch-91 - - Summary: - fix test.py to use options instead of env vars, sftp tests default off - Revision: - secsh--dev--1.0--patch-91 - - fix up the test framework so that the sftp unit tests aren't always run (you - have to ask for them explicitly) and they take their configuration from - command-line options. they still require a remote server. - - modified files: - test.py tests/test_sftp.py - - -2004-09-25 21:58:11 GMT Robey Pointer <robey@lag.net> patch-90 - - Summary: - fix __init__ - Revision: - secsh--dev--1.0--patch-90 - - fix __init__ to export BufferedFile and randpool, and to catch up with the - changes from a week or 2 ago where sftp_attr & friends were split off. - - modified files: - paramiko/__init__.py - - -2004-09-25 21:47:19 GMT Robey Pointer <robey@lag.net> patch-89 - - Summary: - fix some Transport docs - Revision: - secsh--dev--1.0--patch-89 - - document that Transport also would like close() and settimeout() to exist - on the socket-like object passed to the constructor. - - modified files: - paramiko/transport.py - - -2004-09-25 21:32:53 GMT Robey Pointer <robey@lag.net> patch-88 - - Summary: - add Message.rewind() - Revision: - secsh--dev--1.0--patch-88 - - add rewind() method to Message, which just resets the pointer so you can - start reading from the beginning again. this is useful for some tests. - - modified files: - paramiko/message.py tests/test_message.py - - -2004-09-25 21:28:23 GMT Robey Pointer <robey@lag.net> patch-87 - - Summary: - clean up pkey interface - Revision: - secsh--dev--1.0--patch-87 - - change the pkey interface so that it's no longer possible to have a pkey - that doesn't represent a valid key. (ie: no more "blank" key objects.) - also add "get_bits" and "can_sign" methods to determine the key bit length - and whether it can sign things (contains the "private parts") respectively. - - modified files: - paramiko/dsskey.py paramiko/pkey.py paramiko/rsakey.py - - -2004-09-11 21:01:32 GMT Robey Pointer <robey@lag.net> patch-86 - - Summary: - unit tests for Message - Revision: - secsh--dev--1.0--patch-86 - - spanking new unit tests for Message. i'm trying to fix the embarrassment - of having so little of paramiko testable. next up is Transport! - - new files: - tests/.arch-ids/test_message.py.id tests/test_message.py - - -2004-09-11 20:56:01 GMT Robey Pointer <robey@lag.net> patch-85 - - Summary: - move SFTPFile and SFTPAttributes into their own files - Revision: - secsh--dev--1.0--patch-85 - - move SFTPFile and SFTPAttributes into their own files. - - new files: - paramiko/.arch-ids/sftp_attr.py.id - paramiko/.arch-ids/sftp_file.py.id paramiko/sftp_attr.py - paramiko/sftp_file.py - - modified files: - paramiko/sftp.py paramiko/sftp_client.py - - -2004-09-11 20:50:39 GMT Robey Pointer <robey@lag.net> patch-84 - - Summary: - add sftp.normalize - Revision: - secsh--dev--1.0--patch-84 - - kevin c. dorff pointed out that it would be nice to expose a way to - determine the server's "current working directory", so this new method - (normalize) directly maps to REALPATH. - - modified files: - paramiko/sftp_client.py - - -2004-09-11 20:43:09 GMT Robey Pointer <robey@lag.net> patch-83 - - Summary: - tweak Message.add() in the key exchanges - Revision: - secsh--dev--1.0--patch-83 - - use the new Message.add() behavior to make a little code here much easier - to read. - - modified files: - paramiko/kex_gex.py paramiko/kex_group1.py - - -2004-09-11 20:40:08 GMT Robey Pointer <robey@lag.net> patch-82 - - Summary: - doc fixes - Revision: - secsh--dev--1.0--patch-82 - - fix "string" -> "str" in types when documenting BufferedFile. - - modified files: - paramiko/file.py - - -2004-09-11 20:37:59 GMT Robey Pointer <robey@lag.net> patch-81 - - Summary: - more unit tests - Revision: - secsh--dev--1.0--patch-81 - - add test for BufferedFile.read(-1) and sftp.normalize(). - - modified files: - tests/test_file.py tests/test_sftp.py - - -2004-09-11 20:36:49 GMT Robey Pointer <robey@lag.net> patch-80 - - Summary: - move SubsystemHandler to server.py - Revision: - secsh--dev--1.0--patch-80 - - move SubsystemHandler into server.py where it makes more sense (it's part of - the server interface). - - also fix up paramiko's "version string" used in ssh2 negotiation to stop - saying "pyssh" and start saying "paramiko". :) - - modified files: - paramiko/server.py paramiko/transport.py - - -2004-09-11 20:35:19 GMT Robey Pointer <robey@lag.net> patch-79 - - Summary: - Message.add() can take many args - Revision: - secsh--dev--1.0--patch-79 - - a bit of cleanup to Message: add() can now take any number of params, and - will add them all in order (using type guessing). - - modified files: - paramiko/message.py - - -2004-09-09 01:36:45 GMT Robey Pointer <robey@lag.net> patch-78 - - Summary: - fix rbuffer -> _rbuffer in 3 places i missed - Revision: - secsh--dev--1.0--patch-78 - - fix 3 places where "rbuffer" hadn't been converted to "_rbuffer". thanks to - kevin c. dorff for the bug report. - - modified files: - paramiko/file.py - - -2004-09-07 06:56:49 GMT Robey Pointer <robey@lag.net> patch-77 - - Summary: - docs for SubsystemHandler - Revision: - secsh--dev--1.0--patch-77 - - add documentation to constructor for SubsystemHandler. - - modified files: - paramiko/transport.py - - -2004-09-07 06:54:31 GMT Robey Pointer <robey@lag.net> patch-76 - - Summary: - add sftp_client.py - Revision: - secsh--dev--1.0--patch-76 - - i retardedly forgot to import this file a few days ago: it's the split-out - client mode for sftp. it now also has some changes to adapt it to the - improved SFTPAttributes object API. - - new files: - paramiko/.arch-ids/sftp_client.py.id paramiko/sftp_client.py - - -2004-09-07 06:51:03 GMT Robey Pointer <robey@lag.net> patch-75 - - Summary: - clean up SFTPAttributes - Revision: - secsh--dev--1.0--patch-75 - - add english descriptions to the FX_* error codes of sftp. clean up (and - document) SFTPAttributes since it's exported now, and make it simple to - generate one from a python os.stat object. make "_pythonize" the default -- - that is, just use the same field names as python does for os.stat. (i'm not - sure why i didn't do it that way in the first place; probably ignorance.) - also add str() method that converts the SFTPAttributes into a string suitable - for use in ls (used in an obscure way in sftp servers). - - modified files: - paramiko/sftp.py - - -2004-09-07 06:45:53 GMT Robey Pointer <robey@lag.net> patch-74 - - Summary: - note pycrypto 2.0 in README - Revision: - secsh--dev--1.0--patch-74 - - update the README to note that pycrypto 2.0 works (i just tried it). also - fix the name from pyCrypt back to pycrypto -- that project is having trouble - making up its mind about naming. :) - - modified files: - README - - -2004-09-05 07:44:03 GMT Robey Pointer <robey@lag.net> patch-73 - - Summary: - split sftp into sftp, sftp_client; renamed SFTP -> SFTPClient - Revision: - secsh--dev--1.0--patch-73 - - add sftp_client file, and split out the common code (sftp) from stuff specific - to client mode (sftp_client). renamed SFTP class to SFTPClient, but left an - alias so old code will still work. - - renamed a bunch of sftp constants now that they're better hidden from epydoc. - - modified files: - README paramiko/__init__.py paramiko/sftp.py - - -2004-09-05 07:41:45 GMT Robey Pointer <robey@lag.net> patch-72 - - Summary: - some framework for adding subsystem handlers in server mode - Revision: - secsh--dev--1.0--patch-72 - - you can now register a subsystem with a Transport by passing in the name - (like "sftp") and a class (like a hypothetical SFTPServer). the default - ServerInterface.check_channel_request_subsystem now checks this table in - Transport, and if it finds a match, it creates a new thread for the handler - and calls into it. a new class SubsystemHandler is added for this purpose - (to be subclassed). - - modified files: - paramiko/server.py paramiko/transport.py - - -2004-09-05 07:37:40 GMT Robey Pointer <robey@lag.net> patch-71 - - Summary: - remove redundant 'auth_complete' member - Revision: - secsh--dev--1.0--patch-71 - - remove the redundant 'auth_complete' field and just use 'authenticated' for - both client and server mode. this makes the repr() string look correct in - server mode instead of always claiming that the transport is un-auth'd. - - modified files: - paramiko/auth_transport.py - - -2004-09-03 22:39:20 GMT Robey Pointer <robey@lag.net> patch-70 - - Summary: - clean up server interface; no longer need to subclass Channel - Revision: - secsh--dev--1.0--patch-70 - - - export AUTH_*, OPEN_FAILED_*, and the new OPEN_SUCCEEDED into the paramiko - namespace instead of making people dig into paramiko.Transport.AUTH_* etc. - - move all of the check_* methods from Channel to ServerInterface so apps - don't need to subclass Channel anymore just to run an ssh server - - ServerInterface.check_channel_request() returns an error code now, not a - new Channel object - - fix demo_server.py to follow all these changes - - fix a bunch of places where i used "string" in docstrings but meant "str" - - added Channel.get_id() - - modified files: - README demo_server.py paramiko/__init__.py - paramiko/auth_transport.py paramiko/channel.py - paramiko/common.py paramiko/server.py paramiko/sftp.py - paramiko/transport.py - - -2004-08-31 02:44:56 GMT Robey Pointer <robey@lag.net> patch-69 - - Summary: - clean up SecurityOptions - Revision: - secsh--dev--1.0--patch-69 - - the preferences are now tuples in Transport, and passed as tuples out of - SecurityOptions, so that the options can't be modified without setting them - back to the options field again. the algorithm lists in Transport are used - to validate the fields. - - modified files: - paramiko/transport.py - - -2004-08-30 20:22:10 GMT Robey Pointer <robey@lag.net> patch-68 - - Summary: - added Transport.get_security_options() - Revision: - secsh--dev--1.0--patch-68 - - just something i wanted to play with: - added Transport.get_security_options() which returns a SecurityOptions object. - this object is a kind of proxy for the 4 "preferred_*" fields in Transport, - and lets me avoid exposing those fields directly in case i change my mind - later about how they should be stored. - - added some docs to Channel explaining that the request methods now return - True/False, and fixed up docs in a few other places. - - modified files: - paramiko/__init__.py paramiko/channel.py paramiko/server.py - paramiko/sftp.py paramiko/transport.py - - -2004-08-28 04:21:12 GMT Robey Pointer <robey@lag.net> patch-67 - - Summary: - replay patch 63 (missing channel changes) - Revision: - secsh--dev--1.0--patch-67 - - i'm still getting the hang of tla/arch, obviously. - - replay patch 63, which was meant to be part of the later mega-patch, but - apparently when i reversed it, i lost it entirely. - - modified files: - paramiko/channel.py - - -2004-08-27 00:57:40 GMT Robey Pointer <robey@lag.net> patch-66 - - Summary: - new ServerInterface class, outbound rekey works, etc. - Revision: - secsh--dev--1.0--patch-66 - - a bunch of changes that i'm too lazy to split out into individual patches: - * all the server overrides from transport.py have been moved into a separate - class ServerInterface, so server code doesn't have to subclass the whole - paramiko library - * updated demo_server to subclass ServerInterface - * when re-keying during a session, block other messages until the new keys - are activated (openssh doensn't like any other traffic during a rekey) - * re-key when outbound limits are tripped too (was only counting inbound - traffic) - * don't log scary things on EOF - - - new files: - paramiko/.arch-ids/server.py.id paramiko/server.py - - modified files: - README demo_server.py paramiko/__init__.py - paramiko/auth_transport.py paramiko/transport.py - - -2004-08-27 00:28:33 GMT Robey Pointer <robey@lag.net> patch-65 - - Summary: - add settimeout/gettimeout/setblocking, some bugfixes. - Revision: - secsh--dev--1.0--patch-65 - - hide the command and response codes in sftp so they aren't exported. - add settimeout/gettimeout/setblocking that just wrap calls to the underlying - socket or channel. fix _read_all to not catch timeout exceptions. - - - modified files: - paramiko/sftp.py - - -2004-08-27 00:26:35 GMT Robey Pointer <robey@lag.net> patch-64 - - Summary: - reverse messed-up patch - Revision: - secsh--dev--1.0--patch-64 - - Patches applied: - - * robey@lag.net--2003-public/secsh--dev--1.0--base-0 - initial import - - * robey@lag.net--2003-public/secsh--dev--1.0--patch-1 - no changes - - - modified files: - paramiko/channel.py {arch}/=tagging-method - - -2004-08-27 00:06:42 GMT Robey Pointer <robey@lag.net> patch-63 - - Summary: - add settimeout/gettimeout/setblocking, some bugfixes. - Revision: - secsh--dev--1.0--patch-63 - - hide the command and response codes in sftp so they aren't exported. - add settimeout/gettimeout/setblocking that just wrap calls to the underlying - socket or channel. fix _read_all to not catch timeout exceptions. - - modified files: - paramiko/channel.py - - -2004-06-27 20:14:15 GMT Robey Pointer <robey@lag.net> patch-62 - - Summary: - version -> horsea - Revision: - secsh--dev--1.0--patch-62 - - up version to horsea. - - modified files: - Makefile README paramiko/__init__.py setup.py - {arch}/secsh/secsh--dev/secsh--dev--1.0/robey@lag.net--2003-public/patch-log/patch-1 - - -2004-06-10 18:12:00 GMT Robey Pointer <robey@lag.net> patch-61 - - Summary: - no more Foobar - Revision: - secsh--dev--1.0--patch-61 - - fix "Foobar" to be "Paramiko" in the one place i missed it in all the gpl - headers. sigh. :) - - modified files: - paramiko/__init__.py paramiko/auth_transport.py - paramiko/ber.py paramiko/common.py paramiko/dsskey.py - paramiko/kex_gex.py paramiko/kex_group1.py - paramiko/logging22.py paramiko/message.py paramiko/pkey.py - paramiko/primes.py paramiko/rsakey.py - paramiko/ssh_exception.py paramiko/util.py test.py - - -2004-06-10 18:08:50 GMT Robey Pointer <robey@lag.net> patch-60 - - Summary: - limit read/write requests to 32KB, advertise 32KB max packet size - Revision: - secsh--dev--1.0--patch-60 - - one of the unit tests was failing because the openssh sftp server was dropping - the connection without any error. turns out they have a maximum allowed write - size (possibly around 64KB). the sftp rfcs have a small hint that some servers - may drop read/write requests of greater than 32KB. - - so, all reads are limited to 32KB, and all writes > 32KB are now chopped up - and sent in 32KB chunks. this seems to keep openssh happy. - - also, we now advertise 32KB max packet size instead of 8KB (the speed - improves a lot), and log when we read/write a packet. and sftp files are - flushed on seek. - - modified files: - paramiko/sftp.py paramiko/transport.py - - -2004-06-10 18:02:13 GMT Robey Pointer <robey@lag.net> patch-59 - - Summary: - speed up parts of BufferedFile - Revision: - secsh--dev--1.0--patch-59 - - BufferedFile uses cStringIO for the write buffer now (i don't actually notice - any speed difference so this might revert later) and the default buffer size - has been upped from 1KB to 8KB. - - when scanning for linefeeds (when writing to a line-buffered file), only scan - the newly-written bytes, since we know all the previously buffered data is - linefeed-free. this was the #1 slowdown on the 1MB-file unit test. - - also, limit the buffering on line-buffered files to whatever the default - buffer size is. there's no reason to buffer 1MB waiting for a linefeed. - - modified files: - paramiko/file.py - - -2004-06-10 17:55:17 GMT Robey Pointer <robey@lag.net> patch-58 - - Summary: - some Channel fixes for max packet size & blocking on zero window - Revision: - secsh--dev--1.0--patch-58 - - some clean-ups and fixes to channels: - * when send() is blocked on a zero-width window, check that the channel is - still open. this was causing some lockups. - * set a lower bound to the "maximum packet size" we accept from the remote - host. if they tell us anything less than 1KB, assume they meant 1KB. (it's - not reasonable to fragment below that.) - * leave a little padding instead of cutting right up to the maximum packet - size: some space will be taken up by protocol overhead. - * turn off some of the debug log lines unless "ultra_debug" is on (nobody - cares about the feed info) - - - modified files: - paramiko/channel.py - - -2004-06-10 17:35:30 GMT Robey Pointer <robey@lag.net> patch-57 - - Summary: - more unit tests - Revision: - secsh--dev--1.0--patch-57 - - add a unit test for sending a large (1MB) file with line buffering but no - linefeeds (this triggered several bugs and inefficiencies), and another test - to verify that the write buffer is flushed on seek. - - modified files: - tests/test_file.py tests/test_sftp.py - - -2004-05-31 23:48:10 GMT Robey Pointer <robey@lag.net> patch-56 - - Summary: - add forward.py demo script; bump to gyarados - Revision: - secsh--dev--1.0--patch-56 - - add a demo script to show how to do local port forwarding. - - add gyarados to all the docs and bump the version number everywhere. - - new files: - .arch-ids/forward.py.id forward.py - - modified files: - MANIFEST.in Makefile README paramiko/__init__.py setup.py - - -2004-05-29 18:58:11 GMT Robey Pointer <robey@lag.net> patch-55 - - Summary: - add an sftp unit test for making 100 files - Revision: - secsh--dev--1.0--patch-55 - - create 100 files on the remote server, set their mode with chmod, then verify - that they're all there and contain the right data. valeriy is reporting that - sometimes he's getting stuck after 20 and though i'm not seeing it, i want to - add a test to try to pin it down. - - modified files: - tests/test_sftp.py - - -2004-05-29 18:56:10 GMT Robey Pointer <robey@lag.net> patch-54 - - Summary: - add direct-tcpip ability to open_channel - Revision: - secsh--dev--1.0--patch-54 - - open_channel can now be given a dest_addr and src_addr, which are filled in - if the channel type is "forwarded-tcpip" or "direct-tcpip". these channel - types are used in remote & local port forwarding, respectively. i've only - tested "direct-tcpip" but i think if one works, they both should work. - - also fixed a bug in connect where it was still assuming the old meaning for - get_remove_server_key() (oops!) and changed the sense of a send() failure - from <= 0 to < 0 since it may be possible for send() to return 0 and it not - be an EOF error. - - modified files: - paramiko/transport.py - - -2004-05-29 18:48:23 GMT Robey Pointer <robey@lag.net> patch-53 - - Summary: - add note about utf8 encodings - Revision: - secsh--dev--1.0--patch-53 - - add info to the README about what to do if python complains about missing - encodings. veleriy pogrebitskiy ran into this and had advice. - - modified files: - README - - -2004-05-17 07:41:50 GMT Robey Pointer <robey@lag.net> patch-52 - - Summary: - fix deadlock in closing a channel - Revision: - secsh--dev--1.0--patch-52 - - closing a channel would enter an odd codepath where the lock was grabbed, - some stuff was done, then another function was called where the lock was - grabbed again. unfortunately python locks aren't monitors so this would - deadlock. instead, make the smaller function lock-free with an explicit - notice that you must be holding the lock before calling. - - modified files: - paramiko/channel.py - - -2004-05-17 00:43:43 GMT Robey Pointer <robey@lag.net> patch-51 - - Summary: - fix utf8, raise packet size, log exceptions, be more lax with sfp servers - Revision: - secsh--dev--1.0--patch-51 - - explicitly import utf8 encodings for "freezing" (and also because not all - platforms come with utf8, apparently). raise the max acceptable packet size - to 8kB, cuz 2kB was too low. log exceptions at error level instead of debug - level. and don't reject older sftp servers. - - modified files: - paramiko/auth_transport.py paramiko/sftp.py - paramiko/transport.py - - -2004-04-23 22:55:16 GMT Robey Pointer <robey@lag.net> patch-50 - - Summary: - fearow date and last-minute fixes - Revision: - secsh--dev--1.0--patch-50 - - update release date of fearow to 23apr. fix channel._set_closed() to grab - the lock before notifying the in/out buffers that the channel is closed. - try roger's trick for finding the home folder on windows. - - modified files: - Makefile README paramiko/__init__.py paramiko/channel.py - paramiko/common.py - - -2004-04-08 06:31:08 GMT Robey Pointer <robey@lag.net> patch-49 - - Summary: - fix doc typos - Revision: - secsh--dev--1.0--patch-49 - - - modified files: - paramiko/dsskey.py paramiko/rsakey.py paramiko/transport.py - - -2004-04-08 05:48:16 GMT Robey Pointer <robey@lag.net> patch-48 - - Summary: - set version number to fearow - Revision: - secsh--dev--1.0--patch-48 - - set version number to fearow. - - modified files: - Makefile README paramiko/__init__.py setup.py - - -2004-04-08 05:12:20 GMT Robey Pointer <robey@lag.net> patch-47 - - Summary: - add socket.timeout for py22 - Revision: - secsh--dev--1.0--patch-47 - - oops, forgot this vital part of the py22 patches. roger binns sent me a - code patch that included this snip. - - modified files: - paramiko/common.py - - -2004-04-07 16:05:48 GMT Robey Pointer <robey@lag.net> patch-46 - - Summary: - README update notes - Revision: - secsh--dev--1.0--patch-46 - - added notes on what's new, what to watch out for in py22. added a "since: - fearow" to all the relevant API calls that are new. - - modified files: - README paramiko/auth_transport.py paramiko/dsskey.py - paramiko/pkey.py paramiko/rsakey.py paramiko/transport.py - - -2004-04-07 15:52:07 GMT Robey Pointer <robey@lag.net> patch-45 - - Summary: - add set_keepalive() - Revision: - secsh--dev--1.0--patch-45 - - add set_keepalive() to set an automatic keepalive mechanism. (while waiting - for a packet on a connection, we periodically check if it's time to send a - keepalive packet.) - - modified files: - paramiko/transport.py - - -2004-04-07 06:07:29 GMT Robey Pointer <robey@lag.net> patch-44 - - Summary: - add get_username() method for remembering who you auth'd as - Revision: - secsh--dev--1.0--patch-44 - - add get_username() method for remembering who you auth'd as. also, fix these - bugs: - * "continue" auth response counted as a failure (in server mode). - * try to import 'logging' in py22 before falling back to the fake logger, - in case they have a backported version of 'logger' - * raise the right exception when told to read a private key from a file that - isn't a private key file - * tell channels to close when the transport dies - - modified files: - paramiko/auth_transport.py paramiko/channel.py - paramiko/common.py paramiko/pkey.py paramiko/transport.py - - -2004-04-06 22:03:21 GMT Robey Pointer <robey@lag.net> patch-43 - - Summary: - fix encrypted private key files - Revision: - secsh--dev--1.0--patch-43 - - the random byte padding on private key files' BER data was confusing openssh, - so switch to null-byte padding, which is slightly less secure but works with - crappy old openssh. also, enforce the mode when writing the private key - file. we really really want it to be 0600. (python seems to ignore the - mode normally.) - - modified files: - paramiko/pkey.py - - -2004-04-06 08:16:02 GMT Robey Pointer <robey@lag.net> patch-42 - - Summary: - support py22, more or less - Revision: - secsh--dev--1.0--patch-42 - - add roger binns' patches for supporting python 2.2. i hedged a bit on the - logging stuff and just added some trickery to let logging be stubbed out for - python 2.2. this changed a lot of import statements but i managed to avoid - hacking at any of the existing logging. - - socket timeouts are required for the threads to notice when they've been - deactivated. worked around it by using the 'select' module on py22. - - also fixed the sftp unit tests to cope with a password-protected private key. - - new files: - paramiko/.arch-ids/logging22.py.id paramiko/logging22.py - - modified files: - README demo.py demo_server.py demo_simple.py - paramiko/__init__.py paramiko/auth_transport.py - paramiko/channel.py paramiko/common.py paramiko/kex_gex.py - paramiko/kex_group1.py paramiko/message.py paramiko/sftp.py - paramiko/transport.py paramiko/util.py tests/test_sftp.py - - -2004-04-05 22:32:03 GMT Robey Pointer <robey@lag.net> patch-41 - - Summary: - make get_remote_server_key() return a PKey object - Revision: - secsh--dev--1.0--patch-41 - - a good suggestion from roger binns: make get_remote_server_key() just return - a pkey object instead of a tuple of strings. all the strings can be extracted - from the pkey object, as well as other potentially useful things. - - modified files: - demo.py paramiko/transport.py - - -2004-04-05 19:36:40 GMT Robey Pointer <robey@lag.net> patch-40 - - Summary: - add dss key generation too, and fix some bugs - Revision: - secsh--dev--1.0--patch-40 - - added the ability to generate dss keys and write private dss key files, - similar to rsa. in the process, fixed a couple of bugs with ber encoding - and writing password-encrypted key files. the key has to be padded to the - iblock size of the cipher -- it's very difficult to determine how the others - do this, so i just add random bytes to the end. - - fixed the simple demo to use Transport's (host, port) constructor for - simplicity, and fixed a bug where the standard demo's DSS login wouldn't - work. - - also, move the common logfile setup crap into util so all the demos can just - call that one. - - modified files: - demo.py demo_simple.py paramiko/ber.py paramiko/dsskey.py - paramiko/pkey.py paramiko/rsakey.py paramiko/util.py - - -2004-04-05 10:37:18 GMT Robey Pointer <robey@lag.net> patch-39 - - Summary: - add global request mechanism - Revision: - secsh--dev--1.0--patch-39 - - add transport.global_request() to make a global-style request (usually an - extension to the protocol -- like keepalives) and handle requests from the - remote host. incoming requests are now handled and responded to correctly, - which should make openssh-style keepalives work. (before, we would silently - ignore them, which was wrong.) - - modified files: - paramiko/common.py paramiko/message.py paramiko/transport.py - - -2004-04-05 10:24:33 GMT Robey Pointer <robey@lag.net> patch-38 - - Summary: - add common.py file - Revision: - secsh--dev--1.0--patch-38 - - missing from previous change because tla doesn't like to add files in some - situations. (frown) - - - new files: - paramiko/.arch-ids/common.py.id paramiko/common.py - - -2004-04-05 10:16:31 GMT Robey Pointer <robey@lag.net> patch-37 - - Summary: - can now generate rsa keys (not dss yet) - Revision: - secsh--dev--1.0--patch-37 - - added functionality to ber to create ber streams. added some common methods - to PKey to allow dumping the key to base64 (the format used by openssh for - public key files and host key lists), and a factory for creating a key from - a private key file, and a common way to save private keys. RSAKey luckily - didn't have to change that much. - - also added a factory method to RSAKey to generate a new key. - - - modified files: - paramiko/ber.py paramiko/pkey.py paramiko/rsakey.py - - -2004-04-05 10:12:59 GMT Robey Pointer <robey@lag.net> patch-36 - - Summary: - add common.py for commonly used constants and globals - Revision: - secsh--dev--1.0--patch-36 - - common.py now stores the constants and globals. - lots of renaming because of this. - - modified files: - paramiko/auth_transport.py paramiko/channel.py - paramiko/kex_gex.py paramiko/kex_group1.py - paramiko/transport.py paramiko/util.py - - -2004-04-02 02:41:43 GMT Robey Pointer <robey@lag.net> patch-35 - - Summary: - add send_ignore - Revision: - secsh--dev--1.0--patch-35 - - add send_ignore() call to allow for sending garbage ignored packets to the - remote side. - - modified files: - paramiko/transport.py - - -2004-03-16 07:33:09 GMT Robey Pointer <robey@lag.net> patch-34 - - Summary: - fix some arcana in unpacking private keys - Revision: - secsh--dev--1.0--patch-34 - - "!= type([])" is a pretty obscure way to say it. let's try "is not list" - which is a lot more readable. - - (mostly this is a test to make sure tla is working okay on my laptop.) - - modified files: - paramiko/dsskey.py paramiko/rsakey.py - - -2004-03-09 01:09:17 GMT Robey Pointer <robey@lag.net> patch-33 - - Summary: - include tests in manifest - Revision: - secsh--dev--1.0--patch-33 - - include the tests in the manifest for dist, and remove some outdated notes in - NOTES about the exported API (this is doc'd wayyy better in epydoc now). - - modified files: - MANIFEST.in NOTES - - -2004-03-08 17:54:19 GMT Robey Pointer <robey@lag.net> patch-32 - - Summary: - add unit tests - Revision: - secsh--dev--1.0--patch-32 - - add unit tests for BufferedFile and SFTP (it's a start). remove the demo sftp - client because it was 99% copied from the other demos, which makes it kinda - confusing. the unit tests are a much better example. - - new files: - .arch-ids/test.py.id test.py tests/.arch-ids/=id - tests/.arch-ids/test_file.py.id - tests/.arch-ids/test_sftp.py.id tests/test_file.py - tests/test_sftp.py - - removed files: - .arch-ids/demo_sftp.py.id demo_sftp.py - - new directories: - tests tests/.arch-ids - - -2004-03-08 17:52:25 GMT Robey Pointer <robey@lag.net> patch-31 - - Summary: - bump version number to eevee - Revision: - secsh--dev--1.0--patch-31 - - bump the version number to eevee in a few places and talk about the unit - tests. - - modified files: - Makefile README paramiko/__init__.py setup.py - - -2004-03-08 17:50:49 GMT Robey Pointer <robey@lag.net> patch-30 - - Summary: - finish up client sftp support - Revision: - secsh--dev--1.0--patch-30 - - added 'stat' to SFTPFile and SFTP, documented 'open' and 'listdir', and added - 'rmdir', 'lstat', 'symlink', 'chmod', 'chown', 'utime', 'readlink'. - - turned off ultra debugging now that the unit tests are all working. - - modified files: - paramiko/sftp.py - - -2004-03-08 17:45:44 GMT Robey Pointer <robey@lag.net> patch-29 - - Summary: - fix some docs and BufferedFile.readline - Revision: - secsh--dev--1.0--patch-29 - - fix some documentation and fix readline()'s universal newline support to - always return strings ending with '\n', regardless of how they were in the - original file. (this is an obvious feature of python's universal newline - support that i somehow missed before.) - - modified files: - paramiko/file.py paramiko/message.py - - -2004-03-08 09:47:47 GMT Robey Pointer <robey@lag.net> patch-28 - - Summary: - fix lingering thread bug - Revision: - secsh--dev--1.0--patch-28 - - this bug has been in there forever and i could never figure out a workaround - till now. - - when the python interpreter exits, it doesn't necessarily destroy the - remaining objects or call __del__ on anything, and it will lock up until all - threads finish running. how the threads are supposed to notice the exiting - interpreter has always been sort of a mystery to me. - - tonight i figured out how to use the 'atexit' module to register a handler - that runs when the interpreter exits. now we keep a list of active threads - and ask them all to exit on shutdown. no more going to another shell to - kill -9 python! yeah!! - - modified files: - paramiko/transport.py - - -2004-03-04 08:21:45 GMT Robey Pointer <robey@lag.net> patch-27 - - Summary: - add BufferedFile abstraction - Revision: - secsh--dev--1.0--patch-27 - - SFTP client mode is mostly functional. there are probably still some bugs - but most of the operations on "file" objects have survived my simple tests. - - BufferedFile wraps a simpler stream in something that looks like a python - file (and can even handle seeking if the stream underneath supports it). - it's meant to be subclassed. most of it is ripped out of what used to be - ChannelFile so i can reuse it for sftp -- ChannelFile is now tiny. - - SFTP and Message are now exported. - - fixed util.format_binary_line to not quote spaces. - - new files: - .arch-ids/demo_sftp.py.id demo_sftp.py - paramiko/.arch-ids/file.py.id paramiko/.arch-ids/sftp.py.id - paramiko/file.py paramiko/sftp.py - - modified files: - paramiko/__init__.py paramiko/channel.py paramiko/message.py - paramiko/util.py - - -2004-01-27 02:04:59 GMT Robey Pointer <robey@lag.net> patch-26 - - Summary: - Transport constructor can take hostname or address tuple - Revision: - secsh--dev--1.0--patch-26 - - part of an ongoing attempt to make "simple" versions of some of the API calls, - so you can do common-case operations with just a few calls: - - Transport's constructor will now let you pass in a string or tuple instead - of a socket-like object. if you pass in a string, it assumes the string is - a hostname (with optional ":port" segment) and turns that into an address - tuple. if you pass in a tuple, it assumes it's an address tuple. in both - cases, it then creates a socket, connects to the given address, and then - continues as if that was the socket passed in. - - the idea being that you can call Transport('example.com') and it will do - the right thing. - - modified files: - paramiko/transport.py - - -2004-01-27 02:00:19 GMT Robey Pointer <robey@lag.net> patch-25 - - Summary: - pkey no longer raises binascii.Error - Revision: - secsh--dev--1.0--patch-25 - - catch binascii.Error in the private key decoder and convert it into an - SSHException. there's no reason people should have to care that it was a - decoding error vs. any of the other million things that could be wrong in - a corrupt key file. - - modified files: - paramiko/pkey.py - - -2004-01-27 01:45:44 GMT Robey Pointer <robey@lag.net> patch-24 - - Summary: - document more of Message; add get_int64 - Revision: - secsh--dev--1.0--patch-24 - - all of the get_* methods are now documented, but there's a bit more to do. - get_int64 added for eventual sftp support. - - modified files: - paramiko/message.py - - -2004-01-04 10:33:05 GMT Robey Pointer <robey@lag.net> patch-23 - - Summary: - quick doc fix. - Revision: - secsh--dev--1.0--patch-23 - - fix broken cross-link in kex_gex docs. - - modified files: - paramiko/kex_gex.py - - -2004-01-04 10:26:00 GMT Robey Pointer <robey@lag.net> patch-22 - - Summary: - fix MANIFEST.in, change version numbers to 0.9-doduo, fix LPGL notices - Revision: - secsh--dev--1.0--patch-22 - - fixed MANIFEST.in to include the demo scripts, LICENSE, and ChangeLog. - upped everything to version 0.9-doduo. - - fixed the copyright notice, and added the LGPL banner to the top of every - python file. - - modified files: - MANIFEST.in Makefile NOTES README paramiko/__init__.py - paramiko/auth_transport.py paramiko/ber.py paramiko/channel.py - paramiko/dsskey.py paramiko/kex_gex.py paramiko/kex_group1.py - paramiko/message.py paramiko/pkey.py paramiko/primes.py - paramiko/rsakey.py paramiko/ssh_exception.py - paramiko/transport.py paramiko/util.py setup.py - - -2004-01-04 10:07:35 GMT Robey Pointer <robey@lag.net> patch-21 - - Summary: - MANIFEST -> MANIFEST.in, fix setup.py. - Revision: - secsh--dev--1.0--patch-21 - - out with MANIFEST, in with MANIFEST.in. - - new files: - .arch-ids/MANIFEST.in.id MANIFEST.in - - removed files: - .arch-ids/MANIFEST.id MANIFEST - - modified files: - setup.py - - -2004-01-04 09:29:13 GMT Robey Pointer <robey@lag.net> patch-20 - - Summary: - more docs, and password-protected key files can now be read - Revision: - secsh--dev--1.0--patch-20 - - lots more documentation, some of it moved out of the README file, which is - now much smaller and less rambling. - - repr(Transport) now reports the number of bits used in the cipher. - - cleaned up BER to use util functions, and throw a proper exception (the new - BERException) on error. it doesn't ever have to be a full BER decoder, but - it can at least comb its hair and tuck in its shirt. - - lots of stuff added to PKey.read_private_key_file so it can try to decode - password-protected key files. right now it only understands "DES-EDE3-CBC" - format, but this is the only format i've seen openssh make so far. if the - key is password-protected, but no password was given, a new exception - (PasswordRequiredException) is raised so an outer layer can ask for a password - and try again. - - modified files: - README demo.py demo_server.py paramiko/__init__.py - paramiko/auth_transport.py paramiko/ber.py paramiko/channel.py - paramiko/dsskey.py paramiko/pkey.py paramiko/primes.py - paramiko/rsakey.py paramiko/ssh_exception.py - paramiko/transport.py paramiko/util.py - - -2003-12-31 06:31:43 GMT Robey Pointer <robey@lag.net> patch-19 - - Summary: - renamed auth_key -> auth_publickey; more docs. - Revision: - secsh--dev--1.0--patch-19 - - renamed Transport.auth_key to auth_publickey for consistency. and lots more - documentation. - - modified files: - README demo.py demo_server.py paramiko/__init__.py - paramiko/auth_transport.py paramiko/transport.py - - -2003-12-30 22:24:21 GMT Robey Pointer <robey@lag.net> patch-18 - - Summary: - added public-key support to server mode, more docs - Revision: - secsh--dev--1.0--patch-18 - - added public-key support to server mode (it can now verify a client signature) - and added a demo of that to the demo_server.py script (user_rsa_key). in the - process, cleaned up the API of PKey so that now it only has to know about - signing and verifying ssh2 blobs, and can be hashed and compared with other - keys (comparing & hashing only the public parts of the key). keys can also - be created from strings now too. - - some more documentation and hiding private methods. - - new files: - .arch-ids/user_rsa_key.id .arch-ids/user_rsa_key.pub.id - user_rsa_key user_rsa_key.pub - - modified files: - Makefile demo_server.py paramiko/__init__.py - paramiko/auth_transport.py paramiko/dsskey.py - paramiko/kex_gex.py paramiko/kex_group1.py paramiko/pkey.py - paramiko/rsakey.py paramiko/transport.py - - -2003-12-30 07:18:20 GMT Robey Pointer <robey@lag.net> patch-17 - - Summary: - lots more documentation, and added Transport.connect() - Revision: - secsh--dev--1.0--patch-17 - - renamed demo_host_key to demo_rsa_key. moved changelog to a separate file, - and indicated that future changelog entries should be fetched from tla. - tried to clean up "__all__" in a way that makes epydoc still work. - - added lots more documentation, and renamed many methods and vars to hide - them as private non-exported API. - - Transport's ModulusPack is now a static member, so it only has to be loaded - once, and can then be used by any future Transport object. - - added Transport.connect(), which tries to wrap all the SSH2 negotiation and - authentication into one method. you should be able to create a Transport, - call connect(), and then create channels. - - new files: - .arch-ids/ChangeLog.id .arch-ids/demo_simple.py.id ChangeLog - demo_simple.py paramiko/.arch-ids/pkey.py.id paramiko/pkey.py - - removed files: - .arch-ids/paramiko.py.id paramiko.py - - modified files: - Makefile NOTES README demo.py demo_server.py - paramiko/__init__.py paramiko/auth_transport.py - paramiko/channel.py paramiko/dsskey.py paramiko/kex_gex.py - paramiko/kex_group1.py paramiko/rsakey.py - paramiko/transport.py setup.py {arch}/=tagging-method - - renamed files: - .arch-ids/demo_host_key.id - ==> .arch-ids/demo_rsa_key.id - demo_host_key - ==> demo_rsa_key - - -2003-12-28 03:20:42 GMT Robey Pointer <robey@lag.net> patch-16 - - Summary: - hook up server-side kex-gex; add more documentation - Revision: - secsh--dev--1.0--patch-16 - - group-exchange kex should work now on the server side. it will only be - advertised if a "moduli" file has been loaded (see the -gasp- docs) so we - don't spend hours (literally. hours.) computing primes. some of the logic - was previously wrong, too, since it had never been tested. - - fixed repr() string for Transport/BaseTransport. moved is_authenticated to - Transport where it belongs. - - added lots of documentation (but still only about 10% documented). lots of - methods were made private finally. - - new files: - paramiko/.arch-ids/primes.py.id paramiko/primes.py - - modified files: - NOTES demo.py demo_server.py paramiko/__init__.py - paramiko/auth_transport.py paramiko/channel.py - paramiko/kex_gex.py paramiko/kex_group1.py - paramiko/transport.py paramiko/util.py - - -2003-12-27 02:03:44 GMT Robey Pointer <robey@lag.net> patch-15 - - Summary: - fix up new paramiko/ folder. - Revision: - secsh--dev--1.0--patch-15 - - moved SSHException to a new file (ssh_exception.py) and turned paramiko.py - into an __init__.py file. i'm still not entirely sure how this normally - works, so i may have done something wrong, but it's supposed to work the - same as before. - - new files: - paramiko/.arch-ids/__init__.py.id - paramiko/.arch-ids/ssh_exception.py.id paramiko/__init__.py - paramiko/ssh_exception.py - - modified files: - paramiko/auth_transport.py paramiko/channel.py - paramiko/dsskey.py paramiko/kex_gex.py paramiko/kex_group1.py - paramiko/transport.py - - -2003-12-27 01:49:19 GMT Robey Pointer <robey@lag.net> patch-14 - - Summary: - move the paramiko files into a paramiko/ folder. - Revision: - secsh--dev--1.0--patch-14 - - just moving the files into a folder. it won't build this way yet. - - new files: - paramiko/.arch-ids/=id - - renamed files: - .arch-ids/auth_transport.py.id - ==> paramiko/.arch-ids/auth_transport.py.id - .arch-ids/ber.py.id - ==> paramiko/.arch-ids/ber.py.id - .arch-ids/channel.py.id - ==> paramiko/.arch-ids/channel.py.id - .arch-ids/dsskey.py.id - ==> paramiko/.arch-ids/dsskey.py.id - .arch-ids/kex_gex.py.id - ==> paramiko/.arch-ids/kex_gex.py.id - .arch-ids/kex_group1.py.id - ==> paramiko/.arch-ids/kex_group1.py.id - .arch-ids/message.py.id - ==> paramiko/.arch-ids/message.py.id - .arch-ids/rsakey.py.id - ==> paramiko/.arch-ids/rsakey.py.id - .arch-ids/transport.py.id - ==> paramiko/.arch-ids/transport.py.id - .arch-ids/util.py.id - ==> paramiko/.arch-ids/util.py.id - auth_transport.py - ==> paramiko/auth_transport.py - ber.py - ==> paramiko/ber.py - channel.py - ==> paramiko/channel.py - dsskey.py - ==> paramiko/dsskey.py - kex_gex.py - ==> paramiko/kex_gex.py - kex_group1.py - ==> paramiko/kex_group1.py - message.py - ==> paramiko/message.py - rsakey.py - ==> paramiko/rsakey.py - transport.py - ==> paramiko/transport.py - util.py - ==> paramiko/util.py - - new directories: - paramiko paramiko/.arch-ids - - -2003-12-24 22:09:43 GMT Robey Pointer <robey@lag.net> patch-13 - - Summary: - fix a deadlock/race in handle_eof & close - Revision: - secsh--dev--1.0--patch-13 - - (patch from fred gansevles) - add locking around the eof handler and the close() call, so we can't be in - both simultaneously. - - modified files: - channel.py - - -2003-12-24 20:49:38 GMT Robey Pointer <robey@lag.net> patch-12 - - Summary: - fix dss key signing - Revision: - secsh--dev--1.0--patch-12 - - (expanded on a patch from fred gansevles) - add a demo dss key for server mode, and fix some bugs that had caused the dss - signing stuff to never work before. the demo_server is a bit more verbose - now, too. both key types (RSAKey & DSSKey) now have a function to return the - fingerprint of the key, and both versions of read_private_key_file() now raise - exceptions on failure, instead of just silently setting "valid" to false. - - new files: - .arch-ids/demo_dss_key.id demo_dss_key - - modified files: - demo_server.py dsskey.py kex_gex.py kex_group1.py paramiko.py - rsakey.py transport.py - - -2003-12-23 06:44:56 GMT Robey Pointer <robey@lag.net> patch-11 - - Summary: - in server mode, don't offer keys we don't have - Revision: - secsh--dev--1.0--patch-11 - - (from Paolo Losi) in server mode, when advertising which key methods we - support, don't list methods that we don't have any existing keys for. - - modified files: - transport.py - - -2003-12-23 06:36:27 GMT Robey Pointer <robey@lag.net> patch-10 - - Summary: - add logfiles and .pyc files to the "junk" list - Revision: - secsh--dev--1.0--patch-10 - - add *.log and *.pyc to the explicit junk list. - - modified files: - {arch}/=tagging-method - - -2003-11-10 08:49:50 GMT Robey Pointer <robey@lag.net> patch-9 - - Summary: - rename secsh -> paramiko - Revision: - secsh--dev--1.0--patch-9 - - also, rename SecshException back to SSHException. sigh. :) - - modified files: - ./MANIFEST ./Makefile ./NOTES ./README ./auth_transport.py - ./channel.py ./demo.py ./demo_server.py ./kex_gex.py - ./kex_group1.py ./message.py ./paramiko.py ./setup.py - ./transport.py - - renamed files: - ./.arch-ids/secsh.py.id - ==> ./.arch-ids/paramiko.py.id - ./secsh.py - ==> ./paramiko.py - - -2003-11-10 06:52:35 GMT Robey Pointer <robey@lag.net> patch-8 - - Summary: - doc changes - Revision: - secsh--dev--1.0--patch-8 - - - modified files: - ./README ./demo_server.py ./secsh.py - - -2003-11-10 04:54:02 GMT Robey Pointer <robey@lag.net> patch-7 - - Summary: - cleaned up server code, renamed some files & classes - Revision: - secsh--dev--1.0--patch-7 - - renamed demo-server.py and demo-host-key to demo_server.py and - demo_host_key, just to be consistent. - - renamed SSHException -> SecshException. - - generalized the mechanism where Channel decides whether to allow - different channel requests: 4 of the main ones (pty, window-change, - shell, and subsystem) go through easily override-able methods now. - you could probably make an actual ssh shell server. - - gave ChannelFile a repr(). - - turned off ultra debugging in the demos. demo_server creates a - subclass of Channel to allow pty/shell and sets an event when the - shell request is made, so that it knows when it can start sending - the fake bbs. - - renamed to charmander and updated some of the distutils files. - - modified files: - ./MANIFEST ./NOTES ./auth_transport.py ./channel.py ./demo.py - ./demo_server.py ./kex_gex.py ./kex_group1.py ./secsh.py - ./setup.py ./transport.py - - renamed files: - ./.arch-ids/demo-host-key.id - ==> ./.arch-ids/demo_host_key.id - ./.arch-ids/demo-server.py.id - ==> ./.arch-ids/demo_server.py.id - ./demo-host-key - ==> ./demo_host_key - ./demo-server.py - ==> ./demo_server.py - - -2003-11-09 21:16:35 GMT Robey Pointer <robey@lag.net> patch-6 - - Summary: - notes about the exported api - Revision: - secsh--dev--1.0--patch-6 - - just wrote some quick notes (for a few of the classes) about which - methods are intended to be the exported API. python has no decent - way of distinguishing private vs public. - - - modified files: - ./NOTES - - -2003-11-09 21:14:21 GMT Robey Pointer <robey@lag.net> patch-5 - - Summary: - big chunk of work which makes server code 95% done - Revision: - secsh--dev--1.0--patch-5 - - fixed auth check methods to return just a result (failed, succeeded, - partially succeeded) and always use get_allowed_auths to determine the - list of allowed auth methods to return. - - channel's internal API changed a bit to allow for client-side vs. - server-side channels. we now honor the "want-reply" bit from channel - requests. in server mode (for now), we automatically allow pty-req - and shell requests without doing anything. - - ChannelFile was fixed up a bit to support universal newlines. readline - got rewritten: the old way used the "greedy" read call from ChannelFile, - which won't work if the socket doesn't have that much data buffered and - ready. now it uses recv directly, and tracks the different newlines. - - demo-server.py now answers to a single shell request (like a CLI ssh - tool will make) and does a very simple demo pretending to be a BBS. - - transport: fixed a bug with parsing the remote side's banner. channel - requests are passed to another method in server mode, to determine if - we should allow it. new allowed channels are added to an accept queue, - and a new method 'accept' (with timeout) will block until the next - incoming channel is ready. - - - modified files: - ./auth_transport.py ./channel.py ./demo-server.py ./demo.py - ./transport.py - - -2003-11-09 20:59:51 GMT Robey Pointer <robey@lag.net> patch-4 - - Summary: - change kex-gex server code to generate primes by hand - Revision: - secsh--dev--1.0--patch-4 - - added a util function "generate_prime" to compare to the incredibly slow C - version, but it's no faster of course. i think kex-gex from the server is - just not going to be feasible without having a separate thread generate some - primes in the background to have handy when a request comes in. so in short, - this still doesn't work. - - also i put bit_length into util and a tb_strings function which gets stack - traceback info and splits it into a list of strings. - - - modified files: - ./kex_gex.py ./util.py - - -2003-11-07 10:36:42 GMT Robey Pointer <robey@lag.net> patch-3 - - Summary: - remove some leftover garbage from dsskey - Revision: - secsh--dev--1.0--patch-3 - - leftover from a cut & paste i was doing a few days ago. bad robey. - - modified files: - ./dsskey.py - - -2003-11-06 07:34:27 GMT Robey Pointer <robey@lag.net> patch-2 - - Summary: - add a demo host key and point demo-server at it. - Revision: - secsh--dev--1.0--patch-2 - - also, temporarily comment out the nonfunctional kex-gex method. - - new files: - ./.arch-ids/demo-host-key.id ./demo-host-key - - modified files: - ./demo-server.py ./transport.py - - -2003-11-04 08:50:22 GMT Robey Pointer <robey@lag.net> patch-1 - - Summary: - no changes - Revision: - secsh--dev--1.0--patch-1 - - why aren't my log messages kept? - - modified files: - ./kex_gex.py - - new patches: - robey@lag.net--2003/secsh--dev--1.0--patch-1 - - -2003-11-04 08:34:24 GMT Robey Pointer <robey@lag.net> base-0 - - Summary: - initial import - Revision: - secsh--dev--1.0--base-0 - - - (automatically generated log message) - - new files: - ./LICENSE ./MANIFEST ./Makefile ./NOTES ./README - ./auth_transport.py ./ber.py ./channel.py ./demo-server.py - ./demo.py ./dsskey.py ./kex_gex.py ./kex_group1.py - ./message.py ./rsakey.py ./secsh.py ./setup.py ./transport.py - ./util.py - - new patches: - robey@lag.net--2003/secsh--dev--1.0--base-0 - - @@ -11,7 +11,7 @@ Paramiko :Paramiko: Python SSH module :Copyright: Copyright (c) 2003-2009 Robey Pointer <robeypointer@gmail.com> -:Copyright: Copyright (c) 2013-2015 Jeff Forcier <jeff@bitprophet.org> +:Copyright: Copyright (c) 2013-2016 Jeff Forcier <jeff@bitprophet.org> :License: `LGPL <https://www.gnu.org/copyleft/lesser.html>`_ :Homepage: http://www.paramiko.org/ :API docs: http://docs.paramiko.org diff --git a/dev-requirements.txt b/dev-requirements.txt index 2547fb5f..cecc434c 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -3,7 +3,7 @@ tox>=1.4,<1.5 # For newer tasks like building Sphinx docs. invoke>=0.13,<2.0 invocations>=0.13,<2.0 -sphinx>=1.1.3,<2.0 +sphinx>=1.1.3,<1.5 alabaster>=0.7.5,<2.0 releases>=1.1.0,<2.0 semantic_version<3.0 diff --git a/paramiko/_version.py b/paramiko/_version.py index 65353bda..2dca25b2 100644 --- a/paramiko/_version.py +++ b/paramiko/_version.py @@ -1,2 +1,2 @@ -__version_info__ = (1, 16, 3) +__version_info__ = (1, 17, 2) __version__ = '.'.join(map(str, __version_info__)) diff --git a/paramiko/file.py b/paramiko/file.py index e3b0a16a..05f2d6e6 100644 --- a/paramiko/file.py +++ b/paramiko/file.py @@ -59,7 +59,7 @@ class BufferedFile (ClosingContextManager): def __del__(self): self.close() - + def __iter__(self): """ Returns an iterator that can be used to iterate over the lines in this @@ -97,7 +97,7 @@ class BufferedFile (ClosingContextManager): :raises StopIteration: when the end of the file is reached. - :return: a line (`str`) read from the file. + :returns: a line (`str`) read from the file. """ line = self.readline() if not line: @@ -119,6 +119,48 @@ class BufferedFile (ClosingContextManager): raise StopIteration return line + def readable(self): + """ + Check if the file can be read from. + + :returns: + `True` if the file can be read from. If `False`, `read` will raise + an exception. + """ + return (self._flags & self.FLAG_READ) == self.FLAG_READ + + def writable(self): + """ + Check if the file can be written to. + + :returns: + `True` if the file can be written to. If `False`, `write` will + raise an exception. + """ + return (self._flags & self.FLAG_WRITE) == self.FLAG_WRITE + + def seekable(self): + """ + Check if the file supports random access. + + :returns: + `True` if the file supports random access. If `False`, `seek` will + raise an exception. + """ + return False + + def readinto(self, buff): + """ + Read up to ``len(buff)`` bytes into :class:`bytearray` *buff* and + return the number of bytes read. + + :returns: + The number of bytes read. + """ + data = self.read(len(buff)) + buff[:len(data)] = data + return len(data) + def read(self, size=None): """ Read at most ``size`` bytes from the file (less if we hit the end of the @@ -132,7 +174,7 @@ class BufferedFile (ClosingContextManager): text data. :param int size: maximum number of bytes to read - :return: + :returns: data read from the file (as bytes), or an empty string if EOF was encountered immediately """ @@ -155,12 +197,12 @@ class BufferedFile (ClosingContextManager): result += new_data self._realpos += len(new_data) self._pos += len(new_data) - return result + return result if size <= len(self._rbuffer): result = self._rbuffer[:size] self._rbuffer = self._rbuffer[size:] self._pos += len(result) - return result + return result while len(self._rbuffer) < size: read_size = size - len(self._rbuffer) if self._flags & self.FLAG_BUFFERED: @@ -176,7 +218,7 @@ class BufferedFile (ClosingContextManager): result = self._rbuffer[:size] self._rbuffer = self._rbuffer[size:] self._pos += len(result) - return result + return result def readline(self, size=None): """ @@ -192,7 +234,7 @@ class BufferedFile (ClosingContextManager): characters (``'\\0'``) if they occurred in the input. :param int size: maximum length of returned string. - :return: + :returns: next line of the file, or an empty string if the end of the file has been reached. @@ -254,7 +296,7 @@ class BufferedFile (ClosingContextManager): xpos = pos + 1 if (line[pos] == cr_byte_value) and (xpos < len(line)) and (line[xpos] == linefeed_byte_value): xpos += 1 - # if the string was truncated, _rbuffer needs to have the string after + # if the string was truncated, _rbuffer needs to have the string after # the newline character plus the truncated part of the line we stored # earlier in _rbuffer self._rbuffer = line[xpos:] + self._rbuffer if truncated else line[xpos:] @@ -277,7 +319,7 @@ class BufferedFile (ClosingContextManager): after rounding up to an internal buffer size) are read. :param int sizehint: desired maximum number of bytes to read. - :return: `list` of lines read from the file. + :returns: `list` of lines read from the file. """ lines = [] byte_count = 0 @@ -300,7 +342,7 @@ class BufferedFile (ClosingContextManager): If a file is opened in append mode (``'a'`` or ``'a+'``), any seek operations will be undone at the next write (as the file position will move back to the end of the file). - + :param int offset: position to move to within the file, relative to ``whence``. :param int whence: @@ -317,7 +359,7 @@ class BufferedFile (ClosingContextManager): useful if the underlying file doesn't support random access, or was opened in append mode. - :return: file position (`number <int>` of bytes). + :returns: file position (`number <int>` of bytes). """ return self._pos diff --git a/paramiko/primes.py b/paramiko/primes.py index 7415c182..d0e17575 100644 --- a/paramiko/primes.py +++ b/paramiko/primes.py @@ -113,12 +113,12 @@ class ModulusPack (object): good = -1 # find nearest bitsize >= preferred for b in bitsizes: - if (b >= prefer) and (b < max) and (b < good or good == -1): + if (b >= prefer) and (b <= max) and (b < good or good == -1): good = b # if that failed, find greatest bitsize >= min if good == -1: for b in bitsizes: - if (b >= min) and (b < max) and (b > good): + if (b >= min) and (b <= max) and (b > good): good = b if good == -1: # their entire (min, max) range has no intersection with our range. diff --git a/paramiko/proxy.py b/paramiko/proxy.py index 5f7f0023..7d67680a 100644 --- a/paramiko/proxy.py +++ b/paramiko/proxy.py @@ -21,7 +21,6 @@ from datetime import datetime import os from shlex import split as shlsplit import signal -from subprocess import Popen, PIPE from select import select import socket import time @@ -49,6 +48,9 @@ class ProxyCommand(ClosingContextManager): :param str command_line: the command that should be executed and used as the proxy. """ + # NOTE: subprocess import done lazily so platforms without it (e.g. + # GAE) can still import us during overall Paramiko load. + from subprocess import Popen, PIPE self.cmd = shlsplit(command_line) self.process = Popen(self.cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, bufsize=0) diff --git a/paramiko/sftp_file.py b/paramiko/sftp_file.py index 8d147342..fdf667cd 100644 --- a/paramiko/sftp_file.py +++ b/paramiko/sftp_file.py @@ -64,13 +64,13 @@ class SFTPFile (BufferedFile): def __del__(self): self._close(async=True) - + def close(self): """ Close the file. """ self._close(async=False) - + def _close(self, async=False): # We allow double-close without signaling an error, because real # Python file objects do. However, we must protect against actually @@ -112,7 +112,7 @@ class SFTPFile (BufferedFile): return True # well, we have part of the request. see if another chunk has the rest. return self._data_in_prefetch_requests(buf_offset + buf_size, offset + size - buf_offset - buf_size) - + def _data_in_prefetch_buffers(self, offset): """ if a block of data is present in the prefetch buffers, at the given @@ -129,7 +129,7 @@ class SFTPFile (BufferedFile): # it's not here return None return index - + def _read_prefetch(self, size): """ read data out of the prefetch buffer, if possible. if the data isn't @@ -149,7 +149,7 @@ class SFTPFile (BufferedFile): return None prefetch = self._prefetch_data[offset] del self._prefetch_data[offset] - + buf_offset = self._realpos - offset if buf_offset > 0: self._prefetch_data[offset] = prefetch[:buf_offset] @@ -158,7 +158,7 @@ class SFTPFile (BufferedFile): self._prefetch_data[self._realpos + size] = prefetch[size:] prefetch = prefetch[:size] return prefetch - + def _read(self, size): size = min(size, self.MAX_REQUEST_SIZE) if self._prefetching: @@ -217,6 +217,16 @@ class SFTPFile (BufferedFile): """ self.sftp.sock.setblocking(blocking) + def seekable(self): + """ + Check if the file supports random access. + + :return: + `True` if the file supports random access. If `False`, + :meth:`seek` will raise an exception + """ + return True + def seek(self, offset, whence=0): self.flush() if whence == self.SEEK_SET: @@ -253,7 +263,7 @@ class SFTPFile (BufferedFile): attr = SFTPAttributes() attr.st_mode = mode self.sftp._request(CMD_FSETSTAT, self.handle, attr) - + def chown(self, uid, gid): """ Change the owner (``uid``) and group (``gid``) of this file. As with @@ -294,7 +304,7 @@ class SFTPFile (BufferedFile): Change the size of this file. This usually extends or shrinks the size of the file, just like the ``truncate()`` method on Python file objects. - + :param size: the new size of the file :type size: int or long """ @@ -302,17 +312,17 @@ class SFTPFile (BufferedFile): attr = SFTPAttributes() attr.st_size = size self.sftp._request(CMD_FSETSTAT, self.handle, attr) - + def check(self, hash_algorithm, offset=0, length=0, block_size=0): """ Ask the server for a hash of a section of this file. This can be used to verify a successful upload or download, or for various rsync-like operations. - + The file is hashed from ``offset``, for ``length`` bytes. If ``length`` is 0, the remainder of the file is hashed. Thus, if both ``offset`` and ``length`` are zero, the entire file is hashed. - + Normally, ``block_size`` will be 0 (the default), and this method will return a byte string representing the requested hash (for example, a string of length 16 for MD5, or 20 for SHA-1). If a non-zero @@ -320,12 +330,12 @@ class SFTPFile (BufferedFile): ``offset + length``) of ``block_size`` bytes is computed as a separate hash. The hash results are all concatenated and returned as a single string. - + For example, ``check('sha1', 0, 1024, 512)`` will return a string of length 40. The first 20 bytes will be the SHA-1 of the first 512 bytes of the file, and the last 20 bytes will be the SHA-1 of the next 512 bytes. - + :param str hash_algorithm: the name of the hash algorithm to use (normally ``"sha1"`` or ``"md5"``) @@ -343,13 +353,13 @@ class SFTPFile (BufferedFile): :return: `str` of bytes representing the hash of each block, concatenated together - + :raises IOError: if the server doesn't support the "check-file" extension, or possibly doesn't support the hash algorithm requested - + .. note:: Many (most?) servers don't support this extension yet. - + .. versionadded:: 1.4 """ t, msg = self.sftp._request(CMD_EXTENDED, 'check-file', self.handle, @@ -358,7 +368,7 @@ class SFTPFile (BufferedFile): alg = msg.get_text() data = msg.get_remainder() return data - + def set_pipelined(self, pipelined=True): """ Turn on/off the pipelining of write operations to this file. When @@ -368,13 +378,13 @@ class SFTPFile (BufferedFile): server responses are collected. This means that if there was an error with one of your later writes, an exception might be thrown from within `.close` instead of `.write`. - + By default, files are not pipelined. - + :param bool pipelined: ``True`` if pipelining should be turned on for this file; ``False`` otherwise - + .. versionadded:: 1.5 """ self.pipelined = pipelined @@ -385,7 +395,7 @@ class SFTPFile (BufferedFile): `.read` calls. If reading the entire file, pre-fetching can dramatically improve the download speed by avoiding roundtrip latency. The file's contents are incrementally buffered in a background thread. - + The prefetched data is stored in a buffer until read via the `.read` method. Once data has been read, it's removed from the buffer. The data may be read in a random order (using `.seek`); chunks of the @@ -418,20 +428,20 @@ class SFTPFile (BufferedFile): n += chunk if len(chunks) > 0: self._start_prefetch(chunks) - + def readv(self, chunks): """ Read a set of blocks from the file by (offset, length). This is more efficient than doing a series of `.seek` and `.read` calls, since the prefetch machinery is used to retrieve all the requested blocks at once. - + :param chunks: a list of (offset, length) tuples indicating which sections of the file to read :type chunks: list(tuple(long, int)) :return: a list of blocks read, in the same order as in ``chunks`` - + .. versionadded:: 1.5.4 """ self.sftp._log(DEBUG, 'readv(%s, %r)' % (hexlify(self.handle), chunks)) @@ -470,7 +480,7 @@ class SFTPFile (BufferedFile): t = threading.Thread(target=self._prefetch_thread, args=(chunks,)) t.setDaemon(True) t.start() - + def _prefetch_thread(self, chunks): # do these read requests in a temporary thread because there may be # a lot of them, so it may block. diff --git a/paramiko/transport.py b/paramiko/transport.py index 75f3ef75..c352246c 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -228,6 +228,7 @@ class Transport (threading.Thread, ClosingContextManager): } _modulus_pack = None + _active_check_timeout = 0.1 def __init__(self, sock, @@ -315,7 +316,7 @@ class Transport (threading.Thread, ClosingContextManager): # we set the timeout so we can check self.active periodically to # see if we should bail. socket.timeout exception is never # propagated. - self.sock.settimeout(0.1) + self.sock.settimeout(self._active_check_timeout) except AttributeError: pass @@ -1427,20 +1428,18 @@ class Transport (threading.Thread, ClosingContextManager): def auth_gssapi_keyex(self, username): """ - Authenticate to the Server with GSS-API / SSPI if GSS-API Key Exchange - was the used key exchange method. + Authenticate to the server with GSS-API/SSPI if GSS-API kex is in use. - :param str username: The username to authenticate as - :param str gss_host: The target host - :param bool gss_deleg_creds: Delegate credentials or not - :return: list of auth types permissible for the next stage of - authentication (normally empty) - :rtype: list - :raise BadAuthenticationType: if GSS-API Key Exchange was not performed - (and no event was passed in) - :raise AuthenticationException: if the authentication failed (and no - event was passed in) - :raise SSHException: if there was a network error + :param str username: The username to authenticate as. + :returns: + a `list` of auth types permissible for the next stage of + authentication (normally empty) + :raises BadAuthenticationType: + if GSS-API Key Exchange was not performed (and no event was passed + in) + :raises AuthenticationException: + if the authentication failed (and no event was passed in) + :raises SSHException: if there was a network error """ if (not self.active) or (not self.initial_kex_done): # we should never try to authenticate unless we're on a secure link @@ -26,9 +26,8 @@ are supported. SFTP client and server mode are both supported too. Required packages: pyCrypto -To install the `in-development version -<https://github.com/paramiko/paramiko/tarball/master#egg=paramiko-dev>`_, use -`pip install paramiko==dev`. +To install the development version, ``pip install -e +git+https://github.com/paramiko/paramiko/#egg=paramiko``. ''' import sys diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst index b7f35878..e4555e32 100644 --- a/sites/www/changelog.rst +++ b/sites/www/changelog.rst @@ -2,6 +2,21 @@ Changelog ========= +* :bug:`334` Make the ``subprocess`` import in ``proxy.py`` lazy so users on + platforms without it (such as Google App Engine) can import Paramiko + successfully. (Relatedly, make it easier to tweak an active socket check + timeout [in `Transport <paramko.transport.Transport>`] which was previously + hardcoded.) Credit: Shinya Okano. +* :support:`854 backported` Fix incorrect docstring/param-list for + `Transport.auth_gssapi_keyex + <paramiko.transport.Transport.auth_gssapi_keyex>` so it matches the real + signature. Caught by ``@Score_Under``. +* :bug:`681` Fix a Python3-specific bug re: the handling of read buffers when + using ``ProxyCommand``. Thanks to Paul Kapp for catch & patch. +* :support:`819 backported (>=1.15,<2.0)` Document how lacking ``gmp`` headers + at install time can cause a significant performance hit if you build PyCrypto + from source. (Most system-distributed packages already have this enabled.) +* :release:`1.17.2 <2016-07-25>` * :release:`1.16.3 <2016-07-25>` * :bug:`673 (1.16+)` (via :issue:`681`) Fix protocol banner read errors (``SSHException``) which would occasionally pop up when using @@ -16,6 +31,7 @@ Changelog should address issues on Windows platforms that often result in errors like ``ArgumentError: [...] int too long to convert``. Thanks to ``@swohlerLL`` for the report and Jason R. Coombs for the patch. +* :release:`1.17.1 <2016-06-21>` * :release:`1.16.2 <2016-06-21>` * :bug:`520 (1.16+)` (Partial fix) Fix at least one instance of race condition driven threading hangs at end of the Python interpreter session. (Includes a @@ -27,6 +43,7 @@ Changelog <paramiko.channel.Channel.fileno>` after the channel has closed). Thanks to Przemysław Strzelczak for the report & reproduction case, and to Krzysztof Rusek for the fix. +* :release:`1.17.0 <2016-04-28>` * :release:`1.16.1 <2016-04-28>` * :release:`1.15.5 <2016-04-28>` * :bug:`670` Due to an earlier bugfix, less-specific ``Host`` blocks' @@ -48,6 +65,9 @@ Changelog * :support:`729 backported (>=1.15,<2.0)` Clean up ``setup.py`` to always use ``setuptools``, not doing so was a historical artifact from bygone days. Thanks to Alex Gaynor. +* :bug:`649 major (==1.17)` Update the module in charge of handling SSH moduli + so it's consistent with OpenSSH behavior re: prime number selection. Thanks + to Damien Tournoud for catch & patch. * :bug:`617` (aka `fabric/fabric#1429 <https://github.com/fabric/fabric/issues/1429>`_; via :issue:`679`; related: :issue:`678`, :issue:`685`, :issue:`615` & :issue:`616`) Fix up @@ -77,6 +97,9 @@ Changelog * :bug:`652` Fix behavior of ``gssapi-with-mic`` auth requests so they fail gracefully (allowing followup via other auth methods) instead of raising an exception. Patch courtesy of ``@jamercee``. +* :feature:`588 (==1.17)` Add missing file-like object methods for + `~paramiko.file.BufferedFile` and `~paramiko.sftp_file.SFTPFile`. Thanks to + Adam Meily for the patch. * :support:`636 backported (>=1.15,<2.0)` Clean up and enhance the README (and rename it to ``README.rst`` from just ``README``). Thanks to ``@LucasRMehl``. * :release:`1.16.0 <2015-11-04>` diff --git a/sites/www/installing.rst b/sites/www/installing.rst index a657c3fc..f16369ff 100644 --- a/sites/www/installing.rst +++ b/sites/www/installing.rst @@ -12,10 +12,6 @@ via `pip <http://pip-installer.org>`_:: $ pip install paramiko -.. note:: - Users who want the bleeding edge can install the development version via - ``pip install paramiko==dev``. - We currently support **Python 2.6, 2.7 and 3.3+** (Python **3.2** should also work but has a less-strong compatibility guarantee from us.) Users on Python 2.5 or older are urged to upgrade. @@ -70,6 +66,32 @@ Tools on the Mac, or the ``build-essential`` package on Ubuntu or Debian Linux -- basically, anything with ``gcc``, ``make`` and so forth) as well as the Python development libraries, often named ``python-dev`` or similar. +Slow vs fast crypto math +~~~~~~~~~~~~~~~~~~~~~~~~ + +PyCrypto attempts to use the ``gmp`` C math library if it is present on your +system, which enables what it internally calls "fastmath" (``_fastmath.so``). +When those headers are not available, it falls back to "slowmath" +(``_slowmath.py``) which is a pure-Python implementation. + +Real-world tests have shown significant benefits to using the C version of this +code; thus we strongly recommend you install the ``gmp`` development headers +**before** installing Paramiko/PyCrypto. E.g.:: + + $ apt-get install libgmp-dev # or just apt + $ yum install gmp-devel # or dnf + $ brew install gmp + +If you're unsure which version of math you've ended up with, a quick way to +check is to examine whether ``_fastmath.so`` or ``_slowmath.py`` appears in the +output of:: + + from Crypto.PublicKey import RSA + print(RSA._impl._math) + +Windows +~~~~~~~ + For **Windows** users we recommend using :ref:`pypm`, installing a C development environment such as `Cygwin <http://cygwin.com>`_ or obtaining a precompiled Win32 PyCrypto package from `voidspace's Python modules page diff --git a/tests/test_client.py b/tests/test_client.py index f71efd5a..d39febac 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -87,6 +87,12 @@ class SSHClientTest (unittest.TestCase): self.sockl.bind(('localhost', 0)) self.sockl.listen(1) self.addr, self.port = self.sockl.getsockname() + self.connect_kwargs = dict( + hostname=self.addr, + port=self.port, + username='slowdive', + look_for_keys=False, + ) self.event = threading.Event() def tearDown(self): @@ -124,7 +130,7 @@ class SSHClientTest (unittest.TestCase): self.tc.get_host_keys().add('[%s]:%d' % (self.addr, self.port), 'ssh-rsa', public_host_key) # Actual connection - self.tc.connect(self.addr, self.port, username='slowdive', **kwargs) + self.tc.connect(**dict(self.connect_kwargs, **kwargs)) # Authentication successful? self.event.wait(1.0) @@ -229,7 +235,7 @@ class SSHClientTest (unittest.TestCase): self.tc = paramiko.SSHClient() self.tc.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.assertEqual(0, len(self.tc.get_host_keys())) - self.tc.connect(self.addr, self.port, username='slowdive', password='pygmalion') + self.tc.connect(password='pygmalion', **self.connect_kwargs) self.event.wait(1.0) self.assertTrue(self.event.is_set()) @@ -284,7 +290,7 @@ class SSHClientTest (unittest.TestCase): self.tc = paramiko.SSHClient() self.tc.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.assertEqual(0, len(self.tc.get_host_keys())) - self.tc.connect(self.addr, self.port, username='slowdive', password='pygmalion') + self.tc.connect(**dict(self.connect_kwargs, password='pygmalion')) self.event.wait(1.0) self.assertTrue(self.event.is_set()) @@ -319,7 +325,7 @@ class SSHClientTest (unittest.TestCase): self.tc = tc self.tc.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.assertEquals(0, len(self.tc.get_host_keys())) - self.tc.connect(self.addr, self.port, username='slowdive', password='pygmalion') + self.tc.connect(**dict(self.connect_kwargs, password='pygmalion')) self.event.wait(1.0) self.assertTrue(self.event.is_set()) @@ -341,12 +347,29 @@ class SSHClientTest (unittest.TestCase): self.tc = paramiko.SSHClient() self.tc.get_host_keys().add('[%s]:%d' % (self.addr, self.port), 'ssh-rsa', public_host_key) # Connect with a half second banner timeout. + kwargs = dict(self.connect_kwargs, banner_timeout=0.5) self.assertRaises( paramiko.SSHException, self.tc.connect, - self.addr, - self.port, - username='slowdive', + **kwargs + ) + + def test_8_auth_trickledown(self): + """ + Failed key auth doesn't prevent subsequent pw auth from succeeding + """ + # NOTE: re #387, re #394 + # If pkey module used within Client._auth isn't correctly handling auth + # errors (e.g. if it allows things like ValueError to bubble up as per + # midway thru #394) client.connect() will fail (at key load step) + # instead of succeeding (at password step) + kwargs = dict( + # Password-protected key whose passphrase is not 'pygmalion' (it's + # 'television' as per tests/test_pkey.py). NOTE: must use + # key_filename, loading the actual key here with PKey will except + # immediately; we're testing the try/except crap within Client. + key_filename=[test_path('test_rsa_password.key')], + # Actual password for default 'slowdive' user password='pygmalion', - banner_timeout=0.5 ) + self._test_connection(**kwargs) diff --git a/tests/test_file.py b/tests/test_file.py index a6ff69e9..7fab6985 100755 --- a/tests/test_file.py +++ b/tests/test_file.py @@ -70,9 +70,9 @@ class BufferedFileTest (unittest.TestCase): def test_2_readline(self): f = LoopbackFile('r+U') - f.write(b'First line.\nSecond line.\r\nThird line.\n' + + f.write(b'First line.\nSecond line.\r\nThird line.\n' + b'Fourth line.\nFinal line non-terminated.') - + self.assertEqual(f.readline(), 'First line.\n') # universal newline mode should convert this linefeed: self.assertEqual(f.readline(), 'Second line.\n') @@ -165,7 +165,28 @@ class BufferedFileTest (unittest.TestCase): f.write(buffer(b'Too small.')) f.close() + def test_9_readable(self): + f = LoopbackFile('r') + self.assertTrue(f.readable()) + self.assertFalse(f.writable()) + self.assertFalse(f.seekable()) + f.close() + + def test_A_writable(self): + f = LoopbackFile('w') + self.assertTrue(f.writable()) + self.assertFalse(f.readable()) + self.assertFalse(f.seekable()) + f.close() + + def test_B_readinto(self): + data = bytearray(5) + f = LoopbackFile('r+') + f._write(b"hello") + f.readinto(data) + self.assertEqual(data, b'hello') + f.close() + if __name__ == '__main__': from unittest import main main() - diff --git a/tests/test_sftp.py b/tests/test_sftp.py index ff146ade..e4c2c3a3 100755 --- a/tests/test_sftp.py +++ b/tests/test_sftp.py @@ -429,6 +429,7 @@ class SFTPTest (unittest.TestCase): line_number += 1 pos_list.append(loc) loc = f.tell() + self.assertTrue(f.seekable()) f.seek(pos_list[6], f.SEEK_SET) self.assertEqual(f.readline(), 'Nouzilly, France.\n') f.seek(pos_list[17], f.SEEK_SET) |