changeset 460:ab5ef616b0d8

make usage of username in smb mount point more flexible imported from: moin--main--1.5--patch-464
author Thomas Waldmann <tw@waldmann-edv.de>
date Mon, 27 Feb 2006 17:24:07 +0000
parents 39e0f08c0906
children c296f00ca63e
files ChangeLog MoinMoin/auth.py wiki/config/more_samples/ldap_smb_farmconfig.py
diffstat 3 files changed, 19 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Feb 27 06:44:33 2006 +0000
+++ b/ChangeLog	Mon Feb 27 17:24:07 2006 +0000
@@ -2,6 +2,21 @@
 # arch-tag: automatic-ChangeLog--arch@arch.thinkmo.de--2003-archives/moin--main--1.5
 #
 
+2006-02-27 18:24:07 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-464
+
+    Summary:
+      make usage of username in smb mount point more flexible
+    Revision:
+      moin--main--1.5--patch-464
+
+    make usage of username in smb mount point more flexible
+    
+
+    modified files:
+     ChangeLog MoinMoin/auth.py
+     wiki/config/more_samples/ldap_smb_farmconfig.py
+
+
 2006-02-27 07:44:33 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-463
 
     Summary:
--- a/MoinMoin/auth.py	Mon Feb 27 06:44:33 2006 +0000
+++ b/MoinMoin/auth.py	Mon Feb 27 17:24:07 2006 +0000
@@ -278,7 +278,9 @@
         web_uid = pwd.getpwnam(web_username)[2] # XXX better just use current uid?
         if logout and user_obj: # logout -> we don't have username in form
             username = user_obj.name # so we take it from previous auth method (moin_cookie e.g.)
-        mountpoint = cfg.smb_mountpoint % username
+        mountpoint = cfg.smb_mountpoint % {
+            'username': 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"
         elif logout:
--- a/wiki/config/more_samples/ldap_smb_farmconfig.py	Mon Feb 27 06:44:33 2006 +0000
+++ b/wiki/config/more_samples/ldap_smb_farmconfig.py	Mon Feb 27 17:24:07 2006 +0000
@@ -103,7 +103,7 @@
     smb_server = "smb.example.org" # smb server name
     smb_domain = 'DOMAIN' # smb domain name
     smb_share = 'FILESHARE' # smb share we mount
-    smb_mountpoint = u'/mnt/wiki/%s' # %s -> username we use for mounting
+    smb_mountpoint = u'/mnt/wiki/%(username)s' # where we mount the smb filesystem
     smb_display_prefix = u"S:" # where //server/share is usually mounted for your windows users (display purposes only)
     smb_dir_user = "wwwrun" # owner of the mounted directories
     smb_dir_mode = "0700" # mode of the mounted directories