View | Details | Raw Unified | Return to bug 33110
Collapse All | Expand All

(-)management/univention-directory-manager-modules/modules/univention/admin/uldap.py (-7 / +9 lines)
 Lines 123-128    Link Here 
123
			if mytype=='dc':
123
			if mytype=='dc':
124
				self.__indomain=1
124
				self.__indomain=1
125
				break
125
				break
126
126
	def getDn(self):
127
	def getDn(self):
127
		if self.__getPosition():
128
		if self.__getPosition():
128
			dn=self.__pos+","+self.__base
129
			dn=self.__pos+","+self.__base
 Lines 129-148    Link Here 
129
		else:
130
		else:
130
			dn=self.__base
131
			dn=self.__base
131
		return dn
132
		return dn
132
	def setDn(self, dn):
133
134
	def setDn(self, dn, case_sensitive_base=True):
133
		try:
135
		try:
134
			self.__indomain=0
136
			self.__indomain=0
135
			baselist=explodeDn(self.getBase())
137
			baselist=explodeDn(self.getBase())
136
			baselist.reverse()
138
			baselist.reverse()
137
			dnlist=explodeDn(dn)
139
			dnlist=explodeDn(dn)
138
			dnlist.reverse()
139
			baselist.reverse()
140
			for i in baselist:
140
			for i in baselist:
141
				dnlist.remove(i)
141
				if case_sensitive and dnlist[-1] != i:
142
			dnlist.reverse()
142
					raise ValueError
143
				elif dnlist[-1].lower() != i.lower():
144
					raise ValueError
145
				dnlist.pop()
143
			self.__pos=string.join(dnlist, ',')
146
			self.__pos=string.join(dnlist, ',')
144
			components=explodeDn(self.__pos,0)
147
			for i in dnlist:
145
			for i in components:
146
				mytype, ign = string.split(i,'=')
148
				mytype, ign = string.split(i,'=')
147
				if mytype=='dc':
149
				if mytype=='dc':
148
					self.__indomain=1
150
					self.__indomain=1
(-)services/univention-ad-connector/modules/univention/connector/__init__.py (-1 / +1 lines)
 Lines 1245-1251    Link Here 
1245
1245
1246
		ud.debug(ud.LDAP, ud.INFO,
1246
		ud.debug(ud.LDAP, ud.INFO,
1247
				       'sync_to_ucs: set position to %s' % string.join( ldap.explode_dn( object['dn'] )[1:], "," ) )
1247
				       'sync_to_ucs: set position to %s' % string.join( ldap.explode_dn( object['dn'] )[1:], "," ) )
1248
		position.setDn( string.join( ldap.explode_dn( object['dn'] )[1:], "," ) ) 
1248
		position.setDn( string.join( ldap.explode_dn( object['dn'] )[1:], "," ), case_sensitive_base=False) 
1249
1249
1250
		try:
1250
		try:
1251
			result = False
1251
			result = False
(-)services/univention-s4-connector/modules/univention/s4connector/__init__.py (-3 / +3 lines)
 Lines 1028-1034    Link Here 
1028
1028
1029
					ucs_module = self.modules[property_type]
1029
					ucs_module = self.modules[property_type]
1030
					position=univention.admin.uldap.position(self.lo.base)
1030
					position=univention.admin.uldap.position(self.lo.base)
1031
					position.setDn(object['dn'])
1031
					position.setDn(object['dn'], case_sensitive_base=False)
1032
					univention.admin.modules.init(self.lo,position,ucs_module)
1032
					univention.admin.modules.init(self.lo,position,ucs_module)
1033
					
1033
					
1034
					if hasattr(ucs_module, 'ldap_extra_objectclasses'):
1034
					if hasattr(ucs_module, 'ldap_extra_objectclasses'):
 Lines 1088-1094    Link Here 
1088
				if ucs_object.has_key(ucs_key):
1088
				if ucs_object.has_key(ucs_key):
1089
					ucs_module = self.modules[property_type]
1089
					ucs_module = self.modules[property_type]
1090
					position=univention.admin.uldap.position(self.lo.base)
1090
					position=univention.admin.uldap.position(self.lo.base)
1091
					position.setDn(object['dn'])
1091
					position.setDn(object['dn'], case_sensitive_base=False)
1092
					univention.admin.modules.init(self.lo,position,ucs_module)
1092
					univention.admin.modules.init(self.lo,position,ucs_module)
1093
1093
1094
					# Special handling for con other attributes, see Bug #20599
1094
					# Special handling for con other attributes, see Bug #20599
 Lines 1355-1361    Link Here 
1355
1355
1356
		if object['dn'].lower() != self.baseConfig['ldap/base'].lower():
1356
		if object['dn'].lower() != self.baseConfig['ldap/base'].lower():
1357
			try:
1357
			try:
1358
				position.setDn( string.join( ldap.explode_dn( object['dn'] )[1:], "," ) ) 
1358
				position.setDn( string.join( ldap.explode_dn( object['dn'] )[1:], "," ), case_sensitive_base=False) 
1359
				ud.debug(ud.LDAP, ud.INFO,
1359
				ud.debug(ud.LDAP, ud.INFO,
1360
							   'sync_to_ucs: set position to %s' % string.join( ldap.explode_dn( object['dn'] )[1:], "," ) )
1360
							   'sync_to_ucs: set position to %s' % string.join( ldap.explode_dn( object['dn'] )[1:], "," ) )
1361
			except univention.admin.uexceptions.noObject:
1361
			except univention.admin.uexceptions.noObject:

Return to bug 33110