|
Line
Link Here
|
| 0 |
-- a/univention-ldap/conffiles/etc/ldap/slapd.conf.d/40univention-ldap-server_database |
0 |
++ b/univention-ldap/conffiles/etc/ldap/slapd.conf.d/40univention-ldap-server_database |
|
Lines 78-84
for indexcombination in indexcombinations:
Link Here
|
| 78 |
attribs.append(attr) |
78 |
attribs.append(attr) |
| 79 |
found_attribs.append(attr) |
79 |
found_attribs.append(attr) |
| 80 |
if not attribs==[] and not indexes==[]: |
80 |
if not attribs==[] and not indexes==[]: |
| 81 |
print 'index\t%s %s'%(','.join(attribs),','.join(indexes)) |
81 |
config_line = 'index\t%s %s' % (','.join(attribs),','.join(indexes)) |
|
|
82 |
max_length = 2000 |
| 83 |
if len(config_line) > max_length: |
| 84 |
head = 'index\t ' |
| 85 |
tail = ' %s'%(','.join(indexes)) |
| 86 |
attributes="" |
| 87 |
for attr in attribs: |
| 88 |
if not attributes: |
| 89 |
# regardless of max length we print at least one attribute per index line |
| 90 |
attributes += '%s' % (attr) |
| 91 |
else: |
| 92 |
if len('%s%s,%s%s' % (head, attributes, attr, tail)) > max_length: |
| 93 |
print '%s%s%s' %(head, attributes, tail) |
| 94 |
attributes="" |
| 95 |
else: |
| 96 |
attributes += ',%s' % (attr) |
| 97 |
if attributes: |
| 98 |
print '%s%s%s' %(head, attributes, tail) |
| 99 |
attributes="" |
| 100 |
else: |
| 101 |
print config_line |