changeset 2041:fa0bec111fdf

fix smb_mount
author Johannes Berg <johannes AT sipsolutions DOT net>
date Tue, 22 May 2007 11:45:16 +0200
parents 68e302934c77
children 4fc338f01037
files MoinMoin/auth/smb_mount.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/auth/smb_mount.py	Tue May 22 11:11:09 2007 +0200
+++ b/MoinMoin/auth/smb_mount.py	Tue May 22 11:45:16 2007 +0200
@@ -39,9 +39,6 @@
         web_username = self.smb_dir_user
         web_uid = pwd.getpwnam(web_username)[2] # XXX better just use current uid?
 
-        if not login: # logout -> we don't have username in form
-            username = user_obj.name # so we take it from previous auth method
-
         mountpoint = self.smb_mountpoint_fn(username)
         if login:
             cmd = u"sudo mount -t cifs -o user=%(user)s,domain=%(domain)s,uid=%(uid)d,dir_mode=%(dir_mode)s,file_mode=%(file_mode)s,iocharset=%(iocharset)s //%(server)s/%(share)s %(mountpoint)s >>%(log)s 2>&1"
@@ -74,10 +71,10 @@
         username = kw.get('username')
         password = kw.get('password')
         if user_obj and user_obj.valid:
-            do_smb(request, username, password, True)
+            self.do_smb(request, username, password, True)
         return ContinueLogin(user_obj)
 
     def logout(self, request, user_obj, **kw):
         if user_obj and not user_obj.valid:
-            do_smb(request, None, None, False)
+            self.do_smb(request, user_obj.name, None, False)
         return user_obj, True