diff options
41 files changed, 158 insertions, 46 deletions
@@ -10,7 +10,7 @@ # ivysaur (22oct04) # jigglypuff (6nov04) - 1.0 # kabuto (12dec04) - 1.1 -# lapras (26feb05) - 1.2 +# lapras (28feb05) - 1.2 release: python ./setup.py sdist --formats=zip @@ -1,7 +1,7 @@ paramiko 1.2 -"lapras" release, 26 feb 2005 +"lapras" release, 28 feb 2005 -Copyright (c) 2003-2004 Robey Pointer <robey@lag.net> +Copyright (c) 2003-2005 Robey Pointer <robey@lag.net> http://www.lag.net/paramiko/ @@ -158,7 +158,9 @@ v1.2 LAPRAS * moved check_global_request into ServerInterface, where it should've been all along (oops) * SFTPHandle's default implementations are fleshed out more -* made logging a bit more consistent +* made logging a bit more consistent, and started logging thread ids +* fixed a few race conditions, one of which would sometimes cause a Transport + to fail to start on slow machines * more unit tests v1.1 KABUTO @@ -1,5 +1,23 @@ #!/usr/bin/python +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> +# +# This file is part of paramiko. +# +# Paramiko is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + import sys, os, socket, threading, getpass, time, base64, select, termios, tty, traceback import paramiko diff --git a/demo_server.py b/demo_server.py index 84d2f5b1..599eb46a 100755 --- a/demo_server.py +++ b/demo_server.py @@ -1,5 +1,23 @@ #!/usr/bin/python +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> +# +# This file is part of paramiko. +# +# Paramiko is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + import sys, os, socket, threading, traceback, base64 import paramiko diff --git a/demo_simple.py b/demo_simple.py index e11ebf15..18e585f6 100755 --- a/demo_simple.py +++ b/demo_simple.py @@ -1,5 +1,23 @@ #!/usr/bin/python +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> +# +# This file is part of paramiko. +# +# Paramiko is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + import sys, os, base64, getpass, socket, traceback, termios, tty, select import paramiko diff --git a/demo_windows.py b/demo_windows.py index 84e3ec60..f3f9f902 100755 --- a/demo_windows.py +++ b/demo_windows.py @@ -1,5 +1,24 @@ #!/usr/bin/python +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> +# +# This file is part of paramiko. +# +# Paramiko is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + + # This demo is like demo_simple.py, but it doesn't try to use select() # to poll the ssh channel for reading, so it can be used on Windows. # It logs into a shell, executes "ls", prints out the results, and @@ -1,5 +1,23 @@ #!/usr/bin/python +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> +# +# This file is part of paramiko. +# +# Paramiko is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + """ Sample script showing how to do local port forwarding over paramiko. diff --git a/paramiko/__init__.py b/paramiko/__init__.py index fc8d32de..d8824bc4 100644 --- a/paramiko/__init__.py +++ b/paramiko/__init__.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # @@ -61,7 +61,7 @@ if sys.version_info < (2, 2): __author__ = "Robey Pointer <robey@lag.net>" -__date__ = "26 Feb 2005" +__date__ = "28 Feb 2005" __version__ = "1.2 (lapras)" __license__ = "GNU Lesser General Public License (LGPL)" diff --git a/paramiko/auth_transport.py b/paramiko/auth_transport.py index 32e99ba9..832f3241 100644 --- a/paramiko/auth_transport.py +++ b/paramiko/auth_transport.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/ber.py b/paramiko/ber.py index d26a6fb0..d479233b 100644 --- a/paramiko/ber.py +++ b/paramiko/ber.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/channel.py b/paramiko/channel.py index 41df4d9c..7862471f 100644 --- a/paramiko/channel.py +++ b/paramiko/channel.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/common.py b/paramiko/common.py index d7414d16..42793751 100644 --- a/paramiko/common.py +++ b/paramiko/common.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/dsskey.py b/paramiko/dsskey.py index f1fe5ae1..cd3edc52 100644 --- a/paramiko/dsskey.py +++ b/paramiko/dsskey.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/file.py b/paramiko/file.py index 442e4339..c0601b0e 100644 --- a/paramiko/file.py +++ b/paramiko/file.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/kex_gex.py b/paramiko/kex_gex.py index c324211c..cd03a7ce 100644 --- a/paramiko/kex_gex.py +++ b/paramiko/kex_gex.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/kex_group1.py b/paramiko/kex_group1.py index 9b77a0f1..263cf8a3 100644 --- a/paramiko/kex_group1.py +++ b/paramiko/kex_group1.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/logging22.py b/paramiko/logging22.py index acf843b8..85f59471 100644 --- a/paramiko/logging22.py +++ b/paramiko/logging22.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/message.py b/paramiko/message.py index 3ebd4f00..17cc5321 100644 --- a/paramiko/message.py +++ b/paramiko/message.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/pkey.py b/paramiko/pkey.py index 9ea781b8..4938127a 100644 --- a/paramiko/pkey.py +++ b/paramiko/pkey.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/primes.py b/paramiko/primes.py index f3809950..73184a5f 100644 --- a/paramiko/primes.py +++ b/paramiko/primes.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/rsakey.py b/paramiko/rsakey.py index 595b29ed..567c716a 100644 --- a/paramiko/rsakey.py +++ b/paramiko/rsakey.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/server.py b/paramiko/server.py index 7493e2c0..8c268d25 100644 --- a/paramiko/server.py +++ b/paramiko/server.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/sftp.py b/paramiko/sftp.py index ccf5b141..1b3014d1 100644 --- a/paramiko/sftp.py +++ b/paramiko/sftp.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/sftp_attr.py b/paramiko/sftp_attr.py index f1cfaf62..5c76e31c 100644 --- a/paramiko/sftp_attr.py +++ b/paramiko/sftp_attr.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index 23826519..3beee67d 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # @@ -52,7 +52,7 @@ class SFTPClient (BaseSFTP): # override default logger transport = self.sock.get_transport() self.logger = util.get_logger(transport.get_log_channel() + '.' + - self.sock.get_name() + '.sftp') + self.sock.get_name() + '.sftp') self.ultra_debug = transport.ultra_debug self._send_version() @@ -145,7 +145,7 @@ class SFTPClient (BaseSFTP): @param mode: mode (python-style) to open in. @type mode: string @param bufsize: desired buffering (-1 = default buffer size, 0 = - unbuffered, 1 = line buffered, >1 = requested buffer size). + unbuffered, 1 = line buffered, >1 = requested buffer size). @type bufsize: int @return: a file object representing the open file. @rtype: SFTPFile @@ -176,7 +176,7 @@ class SFTPClient (BaseSFTP): @type path: string @raise IOError: if the path refers to a folder (directory). Use - L{rmdir} to remove a folder. + L{rmdir} to remove a folder. """ self._request(CMD_REMOVE, path) @@ -192,7 +192,7 @@ class SFTPClient (BaseSFTP): @type newpath: string @raise IOError: if C{newpath} is a folder, or something else goes - wrong. + wrong. """ self._request(CMD_RENAME, oldpath, newpath) @@ -317,7 +317,7 @@ class SFTPClient (BaseSFTP): @param path: path of the file to modify. @type path: string @param times: C{None} or a tuple of (access time, modified time) in - standard internet epoch time (seconds since 01 January 1970 GMT). + standard internet epoch time (seconds since 01 January 1970 GMT). @type times: tuple of int """ if times is None: diff --git a/paramiko/sftp_handle.py b/paramiko/sftp_handle.py index e83f7d50..f290e1f6 100644 --- a/paramiko/sftp_handle.py +++ b/paramiko/sftp_handle.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/sftp_server.py b/paramiko/sftp_server.py index 06fead36..232069d5 100644 --- a/paramiko/sftp_server.py +++ b/paramiko/sftp_server.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/sftp_si.py b/paramiko/sftp_si.py index 3a7e10d5..93b7d062 100644 --- a/paramiko/sftp_si.py +++ b/paramiko/sftp_si.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/ssh_exception.py b/paramiko/ssh_exception.py index bd6a3caa..498ebc2c 100644 --- a/paramiko/ssh_exception.py +++ b/paramiko/ssh_exception.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/transport.py b/paramiko/transport.py index 541b29d8..b03e0078 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/paramiko/util.py b/paramiko/util.py index 636b9f30..2a9909c7 100644 --- a/paramiko/util.py +++ b/paramiko/util.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # @@ -1,5 +1,24 @@ from distutils.core import setup +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> +# +# This file is part of paramiko. +# +# Paramiko is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with Paramiko; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + + longdesc = ''' This is a library for making SSH2 connections (client or server). Emphasis is on using SSH2 as an alternative to SSL for making secure @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/tests/loop.py b/tests/loop.py index 22a173fa..ad5f7ca5 100644 --- a/tests/loop.py +++ b/tests/loop.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/tests/stub_sftp.py b/tests/stub_sftp.py index e1dbb97f..639477cc 100644 --- a/tests/stub_sftp.py +++ b/tests/stub_sftp.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/tests/test_file.py b/tests/test_file.py index 7914a43f..250821cc 100755 --- a/tests/test_file.py +++ b/tests/test_file.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/tests/test_kex.py b/tests/test_kex.py index c7a86899..f4e91932 100644 --- a/tests/test_kex.py +++ b/tests/test_kex.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/tests/test_message.py b/tests/test_message.py index 218ab529..441e3ceb 100644 --- a/tests/test_message.py +++ b/tests/test_message.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/tests/test_pkey.py b/tests/test_pkey.py index 6bbeb53d..3fe48618 100644 --- a/tests/test_pkey.py +++ b/tests/test_pkey.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # diff --git a/tests/test_sftp.py b/tests/test_sftp.py index ba00a184..79a52c25 100755 --- a/tests/test_sftp.py +++ b/tests/test_sftp.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # @@ -438,16 +438,16 @@ class SFTPTest (unittest.TestCase): finally: sftp.remove('%s/hongry.txt' % FOLDER) - def test_E_big_file_no_buffer(self): + def test_E_big_file_big_buffer(self): """ - write a 1MB file, with no linefeeds, and no buffering. + write a 1MB file, with no linefeeds, and a big buffer. """ global g_big_file_test if not g_big_file_test: return kblob = (1024 * 1024 * 'x') try: - f = sftp.open('%s/hongry.txt' % FOLDER, 'w') + f = sftp.open('%s/hongry.txt' % FOLDER, 'w', 128 * 1024) f.write(kblob) f.close() diff --git a/tests/test_transport.py b/tests/test_transport.py index 71ca140d..bd11487f 100644 --- a/tests/test_transport.py +++ b/tests/test_transport.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2003-2004 Robey Pointer <robey@lag.net> +# Copyright (C) 2003-2005 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # |