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.You are not allowed to attach a file to this page.