Attachment 'base_dn.patch'

Download

   1 --- /root/moin-1.9.7/MoinMoin/auth/ldap_login.py	2013-03-17 18:27:09.000000000 +0100
   2 +++ /usr/local/lib/python2.7/dist-packages/MoinMoin/auth/ldap_login.py	2013-12-04 16:10:06.512526895 +0100
   3 @@ -168,6 +168,7 @@
   4                  # you can use %(username)s and %(password)s here to get the stuff entered in the form:
   5                  binddn = self.bind_dn % locals()
   6                  bindpw = self.bind_pw % locals()
   7 +                basedn = self.base_dn % locals()
   8                  l.simple_bind_s(binddn.encode(coding), bindpw.encode(coding))
   9                  logging.debug("Bound with binddn %r" % binddn)
  10  
  11 @@ -180,7 +181,7 @@
  12                                           'surname_attribute',
  13                                           'givenname_attribute',
  14                                           ] if getattr(self, attr) is not None]
  15 -                lusers = l.search_st(self.base_dn, self.scope, filterstr.encode(coding),
  16 +                lusers = l.search_st(basedn, self.scope, filterstr.encode(coding),
  17                                       attrlist=attrs, timeout=self.timeout)
  18                  # we remove entries with dn == None to get the real result list:
  19                  lusers = [(dn, ldap_dict) for dn, ldap_dict in lusers if dn is not None]

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] (2013-12-04 16:38:45, 1.2 KB) [[attachment:base_dn.patch]]
 All files | Selected Files: delete move to page copy to page

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