From MAILER-DAEMON Thu Oct 27 10:14:45 2005
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1EV8Wi-0002Qp-Ie
	for mharc-sshproxy-dev@gnu.org; Thu, 27 Oct 2005 10:14:44 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1EV8We-0002LM-Vb
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:41 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1EV8Wc-0002Ho-KL
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:39 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1EV8Wc-0002HJ-59
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:38 -0400
Received: from [199.232.41.3] (helo=savannah.gnu.org)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1EV8Wc-0000VC-0x
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:38 -0400
Received: from savannah.gnu.org ([127.0.0.1])
	by savannah.gnu.org with smtp (Exim 3.36 #1 (Debian))
	id 1EV8Wa-0003iG-00
	for <sshproxy-dev@nongnu.org>; Thu, 27 Oct 2005 10:14:36 -0400
To: sshproxy-dev@nongnu.org
From: Pierre-Yves Rofes <py@wcube.org>
Message-Id: <E1EV8Wa-0003iG-00@savannah.gnu.org>
Date: Thu, 27 Oct 2005 10:14:36 -0400
Subject: [sshproxy-dev] Changes to sshproxy/SSHproxy/client/console.py
X-BeenThere: sshproxy-dev@nongnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SSH proxy developer list <sshproxy-dev.nongnu.org>
List-Unsubscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/sshproxy-dev>
List-Post: <mailto:sshproxy-dev@nongnu.org>
List-Help: <mailto:sshproxy-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Oct 2005 14:14:41 -0000

Index: sshproxy/SSHproxy/client/console.py
diff -u sshproxy/SSHproxy/client/console.py:1.3 sshproxy/SSHproxy/client/console.py:1.4
--- sshproxy/SSHproxy/client/console.py:1.3	Wed Aug  3 13:40:37 2005
+++ sshproxy/SSHproxy/client/console.py	Thu Oct 27 14:14:36 2005
@@ -17,7 +17,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 
-
+import traceback
 import os.path, threading, paramiko
 import readline
 from cmd import Cmd
@@ -229,7 +229,7 @@
                 break
             except socket.timeout:
                 pass
-        
+
     def do_stat(self, arg):
         """
         stat filename
@@ -271,14 +271,20 @@
         if not arg:
             arg = '.'
         p = self._realpath(arg)
+        #print 'p = %s' % p
+        #print 'arg = %s' % arg
+        #print '%(p)s %(arg)s' % locals()
         if p:
-            #self._cache = {}
+            self._cache = {}
             self.cache(p, force=1)
+            #print self.cache(p).get()
             if self.cache(p).get():
+               
                 self.cwd = p
                 self.set_prompt()
                 return
-            del self._cache[p]
+            if self._cache.has_key(p):
+                del self._cache[p]
         self.stdout.write('No such directory\n')
 
     def complete_lls(self, text, line, begidx, endidx):
@@ -290,6 +296,16 @@
         path = self._realpath(path)
         if not len(path):
             return None
+        # disable cache
+        class NoCache(object):
+            def __init__(self, f, l):
+                self.filename = f
+                self.l = l
+            def get(self):
+                return self.l or [self]    
+
+        return NoCache(path, sftp.listdir(path))
+
         if force or not self._cache.has_key(path):
             self._cache[path] = CacheRemoteDir(sftp, path, self.lock)
         return self._cache[path]
@@ -352,6 +368,10 @@
                 self.stdout.write("%s:\n" % p)
                 for f in self.cache(p).get():
                     c = ''
+                    #try:
+                    #    sftp.stat(f.filename)
+                    #except IOError:
+                    #    continue
                     if self._isdir(os.path.join(p, f.filename)):
                         c = '/'
                     if long:
@@ -447,9 +467,9 @@
 
     def do_put(self, arg):
         """
-            put local_files...
+        put local_files...
 
-                Upload local files to remote server.
+            Upload local files to remote server.
         """
         for file in arg.split():
             if file[0] != '/':
@@ -498,15 +518,46 @@
         """
         self.stdout.write('\n')
         if self.client.sftp:
+            self.client.sftp.close()
             del self.client.sftp
             self.client.sftp = None
         self.save_history()
         return True
 
     def do_rmdir(self, arg):
-        print "Not yet implemented"
+        """
+            rmdir
 
-    def do_mkdir(self, arg):
-        print "Not yet implemented"
+               Remove directory on the remote server.
+        """
+        sftp = self.open_sftp()
+        for dir in arg.split():
+          if dir[0] != '/':
+              d = self._realpath(dir)
+              if not len(d) or d[0] != '/':
+                  self.stdout.write("Directory '%s' does not exist\n" % dir)
+                  continue
+              else:
+                  try:
+                      sftp.rmdir(dir)
+                  except IOError:
+                      self.stdout.write("Error while removing dir: %s\n" % dir)
+                      
 
+    def do_mkdir(self, arg):
+        """
+            mkdir
 
+              Create a directory on the remote server
+        """
+        sftp = self.open_sftp()
+        for dir in arg.split():
+            try:
+                self.stdout.write("do_mkdir...\n")
+                sftp.mkdir(dir, 0777)
+                self.cache(self.cwd, force=1)
+                self.stdout.write("do_mkdir OK\n")
+            except Exception:
+                traceback.print_exc()
+                self.stdout.write("Error mkdir\n")
+                



From MAILER-DAEMON Thu Oct 27 10:14:45 2005
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1EV8Wj-0002SE-L0
	for mharc-sshproxy-dev@gnu.org; Thu, 27 Oct 2005 10:14:45 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1EV8Wf-0002LW-Ba
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:41 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1EV8Wd-0002I4-4y
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:39 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1EV8Wc-0002HH-4D
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:38 -0400
Received: from [199.232.41.3] (helo=savannah.gnu.org)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1EV8Wc-0000VD-1A
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:38 -0400
Received: from savannah.gnu.org ([127.0.0.1])
	by savannah.gnu.org with smtp (Exim 3.36 #1 (Debian))
	id 1EV8Wa-0003iK-00
	for <sshproxy-dev@nongnu.org>; Thu, 27 Oct 2005 10:14:36 -0400
To: sshproxy-dev@nongnu.org
From: Pierre-Yves Rofes <py@wcube.org>
Message-Id: <E1EV8Wa-0003iK-00@savannah.gnu.org>
Date: Thu, 27 Oct 2005 10:14:36 -0400
Subject: [sshproxy-dev] Changes to sshproxy/SSHproxy/client/sftp.py
X-BeenThere: sshproxy-dev@nongnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SSH proxy developer list <sshproxy-dev.nongnu.org>
List-Unsubscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/sshproxy-dev>
List-Post: <mailto:sshproxy-dev@nongnu.org>
List-Help: <mailto:sshproxy-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Oct 2005 14:14:42 -0000

Index: sshproxy/SSHproxy/client/sftp.py
diff -u sshproxy/SSHproxy/client/sftp.py:1.1 sshproxy/SSHproxy/client/sftp.py:1.2
--- sshproxy/SSHproxy/client/sftp.py:1.1	Thu Jul 21 09:43:36 2005
+++ sshproxy/SSHproxy/client/sftp.py	Thu Oct 27 14:14:36 2005
@@ -34,7 +34,10 @@
         @return: list of filenames.
         @rtype: list of string
         """
-        t, msg = self._request(CMD_OPENDIR, path)
+        try:
+            t, msg = self._request(CMD_OPENDIR, path)
+        except IOError:
+            return []
         if t != CMD_HANDLE:
             raise SFTPError('Expected handle')
         handle = msg.get_string()



From MAILER-DAEMON Thu Oct 27 10:14:46 2005
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1EV8Wj-0002RZ-7D
	for mharc-sshproxy-dev@gnu.org; Thu, 27 Oct 2005 10:14:45 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1EV8Wf-0002LT-BL
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:41 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1EV8Wd-0002IS-4s
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:39 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1EV8Wc-0002HV-FU
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:38 -0400
Received: from [199.232.41.3] (helo=savannah.gnu.org)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1EV8Wc-0000VT-Fq
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:38 -0400
Received: from savannah.gnu.org ([127.0.0.1])
	by savannah.gnu.org with smtp (Exim 3.36 #1 (Debian))
	id 1EV8Wc-0003ih-00
	for <sshproxy-dev@nongnu.org>; Thu, 27 Oct 2005 10:14:38 -0400
To: sshproxy-dev@nongnu.org
From: Pierre-Yves Rofes <py@wcube.org>
Message-Id: <E1EV8Wc-0003ih-00@savannah.gnu.org>
Date: Thu, 27 Oct 2005 10:14:38 -0400
Subject: [sshproxy-dev] sshproxy SSHproxy/client/console.py SSHproxy/cl...
X-BeenThere: sshproxy-dev@nongnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SSH proxy developer list <sshproxy-dev.nongnu.org>
List-Unsubscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/sshproxy-dev>
List-Post: <mailto:sshproxy-dev@nongnu.org>
List-Help: <mailto:sshproxy-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Oct 2005 14:14:42 -0000

CVSROOT:	/cvsroot/sshproxy
Module name:	sshproxy
Branch: 	
Changes by:	Pierre-Yves Rofes <pyrofes@savannah.gnu.org>	05/10/27 14:14:36

Modified files:
	SSHproxy/client: console.py sftp.py ssh.py 
	SSHproxy/pwdb  : mysql.py 
	SSHproxy/server: server.py sftp.py 
Removed files:
	sql            : alter_db_schema.sql 

Log message:
	-Implemented mkdir and rmdir
	-Temporarily removed cache

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/sshproxy/sshproxy/SSHproxy/client/console.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/sshproxy/sshproxy/SSHproxy/client/sftp.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/sshproxy/sshproxy/SSHproxy/client/ssh.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/sshproxy/sshproxy/SSHproxy/pwdb/mysql.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/sshproxy/sshproxy/SSHproxy/server/server.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/sshproxy/sshproxy/SSHproxy/server/sftp.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text




From MAILER-DAEMON Thu Oct 27 10:14:46 2005
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1EV8Wj-0002Si-R4
	for mharc-sshproxy-dev@gnu.org; Thu, 27 Oct 2005 10:14:45 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1EV8Wf-0002Li-H4
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:41 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1EV8Wc-0002IA-Ra
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:39 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1EV8Wc-0002HG-45
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:38 -0400
Received: from [199.232.41.3] (helo=savannah.gnu.org)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1EV8Wc-0000VE-2A
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:14:38 -0400
Received: from savannah.gnu.org ([127.0.0.1])
	by savannah.gnu.org with smtp (Exim 3.36 #1 (Debian))
	id 1EV8Wa-0003iO-00
	for <sshproxy-dev@nongnu.org>; Thu, 27 Oct 2005 10:14:36 -0400
To: sshproxy-dev@nongnu.org
From: Pierre-Yves Rofes <py@wcube.org>
Message-Id: <E1EV8Wa-0003iO-00@savannah.gnu.org>
Date: Thu, 27 Oct 2005 10:14:36 -0400
Subject: [sshproxy-dev] Changes to sshproxy/SSHproxy/client/ssh.py
X-BeenThere: sshproxy-dev@nongnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SSH proxy developer list <sshproxy-dev.nongnu.org>
List-Unsubscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/sshproxy-dev>
List-Post: <mailto:sshproxy-dev@nongnu.org>
List-Help: <mailto:sshproxy-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Oct 2005 14:14:42 -0000

Index: sshproxy/SSHproxy/client/ssh.py
diff -u sshproxy/SSHproxy/client/ssh.py:1.7 sshproxy/SSHproxy/client/ssh.py:1.8
--- sshproxy/SSHproxy/client/ssh.py:1.7	Mon Sep 26 13:35:37 2005
+++ sshproxy/SSHproxy/client/ssh.py	Thu Oct 27 14:14:36 2005
@@ -84,6 +84,7 @@
             self.transport.connect(username=username,
                                    password=password,
                                    hostkey=self.hostkey)
+   
         except paramiko.ssh_exception.SSHException, e:
             print e
             # let's force close chans
@@ -174,6 +175,7 @@
                             self.reset_term()
                             self.fdout.write("\n")
                             self.cmd.cmdloop()
+                            print 'end console'
                             fcntl.fcntl(self.fdin, fcntl.F_SETFL, os.O_NDELAY)
                             self.set_term()
                             # send ^L to clear screen and restore cmd line
@@ -182,6 +184,8 @@
                         continue
 
                     self.session.send(x)
+                if not (self.transport.is_active() and self.session.active):
+                    print 'end session...'
         finally:
             self.reset_term()
 



From MAILER-DAEMON Thu Oct 27 10:23:12 2005
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1EV8eu-0005CX-8r
	for mharc-sshproxy-dev@gnu.org; Thu, 27 Oct 2005 10:23:12 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1EV8eo-0005Bw-OW
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:23:07 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1EV8el-0005BH-TU
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:23:04 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1EV8ek-0005Au-VE
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:23:03 -0400
Received: from [199.232.41.3] (helo=savannah.gnu.org)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1EV8ek-0001Nc-Vi
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:23:03 -0400
Received: from savannah.gnu.org ([127.0.0.1])
	by savannah.gnu.org with smtp (Exim 3.36 #1 (Debian))
	id 1EV8Wb-0003iW-00
	for <sshproxy-dev@nongnu.org>; Thu, 27 Oct 2005 10:14:37 -0400
To: sshproxy-dev@nongnu.org
From: Pierre-Yves Rofes <py@wcube.org>
Message-Id: <E1EV8Wb-0003iW-00@savannah.gnu.org>
Date: Thu, 27 Oct 2005 10:14:37 -0400
Subject: [sshproxy-dev] Changes to sshproxy/SSHproxy/server/server.py
X-BeenThere: sshproxy-dev@nongnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SSH proxy developer list <sshproxy-dev.nongnu.org>
List-Unsubscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/sshproxy-dev>
List-Post: <mailto:sshproxy-dev@nongnu.org>
List-Help: <mailto:sshproxy-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Oct 2005 14:23:08 -0000

Index: sshproxy/SSHproxy/server/server.py
diff -u sshproxy/SSHproxy/server/server.py:1.4 sshproxy/SSHproxy/server/server.py:1.5
--- sshproxy/SSHproxy/server/server.py:1.4	Mon Sep 26 09:14:16 2005
+++ sshproxy/SSHproxy/server/server.py	Thu Oct 27 14:14:36 2005
@@ -49,7 +49,7 @@
         return paramiko.AUTH_FAILED
 
     def check_auth_publickey(self, username, key):
-        if pwd.is_allowed(username=username, key=key):
+        if pwdb.is_allowed(username=username, key=key):
             return paramiko.AUTH_SUCCESSFUL
         return paramiko.AUTH_FAILED
 



From MAILER-DAEMON Thu Oct 27 10:23:14 2005
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1EV8eu-0005Ce-T0
	for mharc-sshproxy-dev@gnu.org; Thu, 27 Oct 2005 10:23:13 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1EV8eo-0005Bv-U3
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:23:07 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1EV8el-0005B5-NB
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:23:04 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1EV8ej-0005Ak-Rn
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:23:02 -0400
Received: from [199.232.41.3] (helo=savannah.gnu.org)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1EV8ej-0001NQ-Tz
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:23:02 -0400
Received: from savannah.gnu.org ([127.0.0.1])
	by savannah.gnu.org with smtp (Exim 3.36 #1 (Debian))
	id 1EV8Wb-0003ie-00
	for <sshproxy-dev@nongnu.org>; Thu, 27 Oct 2005 10:14:37 -0400
To: sshproxy-dev@nongnu.org
From: Pierre-Yves Rofes <py@wcube.org>
Message-Id: <E1EV8Wb-0003ie-00@savannah.gnu.org>
Date: Thu, 27 Oct 2005 10:14:37 -0400
Subject: [sshproxy-dev] Changes to sshproxy/sql/alter_db_schema.sql
X-BeenThere: sshproxy-dev@nongnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SSH proxy developer list <sshproxy-dev.nongnu.org>
List-Unsubscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/sshproxy-dev>
List-Post: <mailto:sshproxy-dev@nongnu.org>
List-Help: <mailto:sshproxy-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Oct 2005 14:23:08 -0000





From MAILER-DAEMON Thu Oct 27 10:23:14 2005
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1EV8ew-0005Cy-5S
	for mharc-sshproxy-dev@gnu.org; Thu, 27 Oct 2005 10:23:14 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1EV8ep-0005By-1T
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:23:07 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1EV8el-0005BB-Qq
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:23:04 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1EV8ek-0005Al-EH
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:23:02 -0400
Received: from [199.232.41.3] (helo=savannah.gnu.org)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1EV8ek-0001NW-Bv
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:23:02 -0400
Received: from savannah.gnu.org ([127.0.0.1])
	by savannah.gnu.org with smtp (Exim 3.36 #1 (Debian))
	id 1EV8Wb-0003ia-00
	for <sshproxy-dev@nongnu.org>; Thu, 27 Oct 2005 10:14:37 -0400
To: sshproxy-dev@nongnu.org
From: Pierre-Yves Rofes <py@wcube.org>
Message-Id: <E1EV8Wb-0003ia-00@savannah.gnu.org>
Date: Thu, 27 Oct 2005 10:14:37 -0400
Subject: [sshproxy-dev] Changes to sshproxy/SSHproxy/server/sftp.py
X-BeenThere: sshproxy-dev@nongnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SSH proxy developer list <sshproxy-dev.nongnu.org>
List-Unsubscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/sshproxy-dev>
List-Post: <mailto:sshproxy-dev@nongnu.org>
List-Help: <mailto:sshproxy-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Oct 2005 14:23:09 -0000

Index: sshproxy/SSHproxy/server/sftp.py
diff -u sshproxy/SSHproxy/server/sftp.py:1.1 sshproxy/SSHproxy/server/sftp.py:1.2
--- sshproxy/SSHproxy/server/sftp.py:1.1	Thu Jul 21 09:43:36 2005
+++ sshproxy/SSHproxy/server/sftp.py	Thu Oct 27 14:14:36 2005
@@ -142,6 +142,25 @@
         except IOError:
             return paramiko.SFTP_NO_SUCH_FILE
         
+    def rmdir(self, path):
+        try:
+            self.client.rmdir(path)
+            return paramiko.SFTP_OK
+        except IOError:
+            return paramiko.SFTP_NO_SUCH_FILE
+
+    def mkdir(self, path, *args, **kwargs):
+        try:
+            print ("mkdir...")
+            print args, kwargs
+            args = [args[0].st_mode]
+            self.client.mkdir(path, *args, **kwargs)
+            print ("mkdir OK\n")
+            return paramiko.SFTP_OK
+        except IOError:
+            print 'IOERROR mkdir'
+            return paramiko.SFTP_NO_SUCH_FILE
+
 
 class SFTPServer(paramiko.SFTPServer):
     def __init__(self, channel, name, server, sftp_si=SFTPServerInterface,



From MAILER-DAEMON Thu Oct 27 11:07:16 2005
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1EV9IQ-0001Hw-Nl
	for mharc-sshproxy-dev@gnu.org; Thu, 27 Oct 2005 11:04:02 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1EV9IM-0001EN-1u
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 11:03:58 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1EV99w-0004om-La
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:55:16 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1EV97n-0003aG-ED
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:53:05 -0400
Received: from [199.232.41.3] (helo=savannah.gnu.org)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1EV97n-0005Ih-Gx
	for sshproxy-dev@nongnu.org; Thu, 27 Oct 2005 10:53:03 -0400
Received: from savannah.gnu.org ([127.0.0.1])
	by savannah.gnu.org with smtp (Exim 3.36 #1 (Debian))
	id 1EV8Wb-0003iS-00
	for <sshproxy-dev@nongnu.org>; Thu, 27 Oct 2005 10:14:37 -0400
To: sshproxy-dev@nongnu.org
From: Pierre-Yves Rofes <py@wcube.org>
Message-Id: <E1EV8Wb-0003iS-00@savannah.gnu.org>
Date: Thu, 27 Oct 2005 10:14:37 -0400
Subject: [sshproxy-dev] Changes to sshproxy/SSHproxy/pwdb/mysql.py
X-BeenThere: sshproxy-dev@nongnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SSH proxy developer list <sshproxy-dev.nongnu.org>
List-Unsubscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/sshproxy-dev>
List-Post: <mailto:sshproxy-dev@nongnu.org>
List-Help: <mailto:sshproxy-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Oct 2005 15:04:01 -0000

Index: sshproxy/SSHproxy/pwdb/mysql.py
diff -u sshproxy/SSHproxy/pwdb/mysql.py:1.5 sshproxy/SSHproxy/pwdb/mysql.py:1.6
--- sshproxy/SSHproxy/pwdb/mysql.py:1.5	Tue Sep 27 13:55:48 2005
+++ sshproxy/SSHproxy/pwdb/mysql.py	Thu Oct 27 14:14:36 2005
@@ -334,7 +334,10 @@
             """ % (username, key)
         logins = db.cursor()
         logins.execute(q_access)
-        login = logins.fetchone()[0]
+        try:
+            login = logins.fetchone()[0]
+        except TypeError:
+            return None
         logins.close()
         if login:
             self.login = username



