Univention Bugzilla – Attachment 6571 Details for
Bug 33110
Rejects with ldap/base o=LOCAL4
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
uldap_setDn_case_sensitive_base.patch
uldap_setDn_case_sensitive_base.patch (text/plain), 3.44 KB, created by
Arvid Requate
on 2015-01-05 19:49 CET
(
hide
)
Description:
uldap_setDn_case_sensitive_base.patch
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2015-01-05 19:49 CET
Size:
3.44 KB
patch
obsolete
>Index: management/univention-directory-manager-modules/modules/univention/admin/uldap.py >=================================================================== >--- management/univention-directory-manager-modules/modules/univention/admin/uldap.py (Revision 57088) >+++ management/univention-directory-manager-modules/modules/univention/admin/uldap.py (Arbeitskopie) >@@ -123,6 +123,7 @@ > if mytype=='dc': > self.__indomain=1 > break >+ > def getDn(self): > if self.__getPosition(): > dn=self.__pos+","+self.__base >@@ -129,20 +130,21 @@ > else: > dn=self.__base > return dn >- def setDn(self, dn): >+ >+ def setDn(self, dn, case_sensitive_base=True): > try: > self.__indomain=0 > baselist=explodeDn(self.getBase()) > baselist.reverse() > dnlist=explodeDn(dn) >- dnlist.reverse() >- baselist.reverse() > for i in baselist: >- dnlist.remove(i) >- dnlist.reverse() >+ if case_sensitive and dnlist[-1] != i: >+ raise ValueError >+ elif dnlist[-1].lower() != i.lower(): >+ raise ValueError >+ dnlist.pop() > self.__pos=string.join(dnlist, ',') >- components=explodeDn(self.__pos,0) >- for i in components: >+ for i in dnlist: > mytype, ign = string.split(i,'=') > if mytype=='dc': > self.__indomain=1 >Index: services/univention-ad-connector/modules/univention/connector/__init__.py >=================================================================== >--- services/univention-ad-connector/modules/univention/connector/__init__.py (Revision 57088) >+++ services/univention-ad-connector/modules/univention/connector/__init__.py (Arbeitskopie) >@@ -1245,7 +1245,7 @@ > > ud.debug(ud.LDAP, ud.INFO, > 'sync_to_ucs: set position to %s' % string.join( ldap.explode_dn( object['dn'] )[1:], "," ) ) >- position.setDn( string.join( ldap.explode_dn( object['dn'] )[1:], "," ) ) >+ position.setDn( string.join( ldap.explode_dn( object['dn'] )[1:], "," ), case_sensitive_base=False) > > try: > result = False >Index: services/univention-s4-connector/modules/univention/s4connector/__init__.py >=================================================================== >--- services/univention-s4-connector/modules/univention/s4connector/__init__.py (Revision 57088) >+++ services/univention-s4-connector/modules/univention/s4connector/__init__.py (Arbeitskopie) >@@ -1028,7 +1028,7 @@ > > ucs_module = self.modules[property_type] > position=univention.admin.uldap.position(self.lo.base) >- position.setDn(object['dn']) >+ position.setDn(object['dn'], case_sensitive_base=False) > univention.admin.modules.init(self.lo,position,ucs_module) > > if hasattr(ucs_module, 'ldap_extra_objectclasses'): >@@ -1088,7 +1088,7 @@ > if ucs_object.has_key(ucs_key): > ucs_module = self.modules[property_type] > position=univention.admin.uldap.position(self.lo.base) >- position.setDn(object['dn']) >+ position.setDn(object['dn'], case_sensitive_base=False) > univention.admin.modules.init(self.lo,position,ucs_module) > > # Special handling for con other attributes, see Bug #20599 >@@ -1355,7 +1355,7 @@ > > if object['dn'].lower() != self.baseConfig['ldap/base'].lower(): > try: >- position.setDn( string.join( ldap.explode_dn( object['dn'] )[1:], "," ) ) >+ position.setDn( string.join( ldap.explode_dn( object['dn'] )[1:], "," ), case_sensitive_base=False) > ud.debug(ud.LDAP, ud.INFO, > 'sync_to_ucs: set position to %s' % string.join( ldap.explode_dn( object['dn'] )[1:], "," ) ) > except univention.admin.uexceptions.noObject:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 33110
:
5561
|
5562
| 6571