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

(-)a/services/univention-ad-connector/univention-adsearch (-6 / +3 lines)
 Lines 34-39    Link Here 
34
34
35
import sys
35
import sys
36
import os
36
import os
37
import re
37
import univention.config_registry
38
import univention.config_registry
38
from ldap.controls import LDAPControl
39
from ldap.controls import LDAPControl
39
from ldap.controls import SimplePagedResultsControl
40
from ldap.controls import SimplePagedResultsControl
 Lines 193-205   page_size = 1000 Link Here 
193
194
194
lc2 = SimplePagedResultsControl(True, page_size, '')
195
lc2 = SimplePagedResultsControl(True, page_size, '')
195
196
196
filter = ""
197
197
198
for i in filter_tmp.split(","):
198
objectsid_pattern = re.compile('objectsid=([^)]+)', flags=re.I)
199
	j = i.split("=")
199
filter = objectsid_pattern.sub(lambda m: 'objectSid=%s' % encode_object_sid_to_binary_ldapfilter(m.group(1)), filter_tmp)
200
	if j[0] == "objectSid":
201
		j[1] = encode_object_sid_to_binary_ldapfilter(j[1])
202
	filter += (j[0] + "=" + j[1])
203
200
204
if filter_attributes:
201
if filter_attributes:
205
	msgid = lo.search_ext(configRegistry['%s/ad/ldap/base' % CONFIGBASENAME], ldap.SCOPE_SUBTREE, filter.encode('utf8'), filter_attributes, serverctrls=[lc1, lc2])
202
	msgid = lo.search_ext(configRegistry['%s/ad/ldap/base' % CONFIGBASENAME], ldap.SCOPE_SUBTREE, filter.encode('utf8'), filter_attributes, serverctrls=[lc1, lc2])

Return to bug 45134