Attachment 'moin-negotiate-auth.diff'

Download

   1 diff -ubr /home/wendland/src/misc/moin-1.3.4/MoinMoin/multiconfig.py MoinMoin/multiconfig.py
   2 --- /home/wendland/src/misc/moin-1.3.4/MoinMoin/multiconfig.py	2005-03-12 22:26:14.000000000 +0100
   3 +++ MoinMoin/multiconfig.py	2005-04-27 18:04:49.000000000 +0200
   4 @@ -193,6 +193,7 @@
   5      mail_login = None # or "user pwd" if you need to use SMTP AUTH
   6      mail_smarthost = None
   7      mail_from = None
   8 +    mangle_username = {'NTLM': lambda name: name.title(),}
   9      navi_bar = [ u'%(page_front_page)s', u'RecentChanges', u'FindPage', u'HelpContents', ]
  10      nonexist_qm = 0
  11  
  12 diff -ubr /home/wendland/src/misc/moin-1.3.4/MoinMoin/request.py MoinMoin/request.py
  13 --- /home/wendland/src/misc/moin-1.3.4/MoinMoin/request.py	2005-03-06 23:15:45.000000000 +0100
  14 +++ MoinMoin/request.py	2005-04-27 19:09:40.000000000 +0200
  15 @@ -7,7 +7,7 @@
  16      @license: GNU GPL, see COPYING for details.
  17  """
  18  
  19 -import os, time, sys, types, cgi
  20 +import os, time, sys, types, cgi, pwd
  21  from MoinMoin import config, wikiutil, user, error
  22  from MoinMoin.util import MoinMoinNoFooter, IsWin9x, FixScriptName
  23  
  24 @@ -282,15 +282,17 @@
  25  
  26          if self.cfg.auth_http_enabled:
  27              auth_type = env.get('AUTH_TYPE','')
  28 -            if auth_type in ['Basic', 'Digest', 'NTLM', ]:
  29 +            if auth_type in ['Basic', 'Digest', 'NTLM', 'Negotiate', ]:
  30                  username = env.get('REMOTE_USER','')
  31                  if auth_type == 'NTLM':
  32                      # converting to standard case so that the user can even enter wrong case
  33                      # (added since windows does not distinguish between e.g. "Mike" and "mike")
  34                      username = username.split('\\')[-1] # split off domain e.g. from DOMAIN\user
  35 -                    # this "normalizes" the login name from {meier, Meier, MEIER} to Meier
  36 -                    # put a comment sign in front of next line if you don't want that:
  37 -                    username = username.title()
  38 +                elif auth_type == 'Negotiate':
  39 +                    # split off Kerberos realm
  40 +                    username = username.split('@')[0]
  41 +                if self.cfg.mangle_username.has_key(auth_type):
  42 +                    username = self.cfg.mangle_username[auth_type](username)
  43                  self.auth_username = username
  44                                      
  45  ##        f=open('/tmp/env.log','a')

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2005-07-12 02:26:49, 6.3 KB) [[attachment:NewTableOfContents-1.3.4.py]]
  • [get | view] (2005-05-01 18:12:47, 2.6 KB) [[attachment:README]]
  • [get | view] (2003-12-07 18:15:55, 1.3 KB) [[attachment:TableOfContents-startdepth.diff]]
  • [get | view] (2005-06-25 14:38:34, 4.3 KB) [[attachment:moin-1.3.4-rss_rc.py-per_page_feeds.patch]]
  • [get | view] (2005-06-09 20:25:52, 10.1 KB) [[attachment:moin-cache-friendly.diff]]
  • [get | view] (2005-04-27 17:22:13, 2.3 KB) [[attachment:moin-negotiate-auth.diff]]
  • [get | view] (2005-04-04 05:12:33, 18.0 KB) [[attachment:moinmoin-1.3.4-editor-insert-patch.diff]]
  • [get | view] (2005-04-04 05:50:16, 43.3 KB) [[attachment:moinmoin-1.3.4-editor-insert-screenshot.png]]
  • [get | view] (2005-08-17 20:24:31, 18.1 KB) [[attachment:moinmoin-1.3.5-editor-insert-patch.diff]]
  • [get | view] (2003-12-07 18:15:55, 13.0 KB) [[attachment:multisearch.diff]]
  • [get | view] (2005-06-14 14:45:06, 0.8 KB) [[attachment:vary-cookie.diff]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.