Univention Bugzilla – Attachment 7784 Details for
Bug 41648
slapd failed if line in slapd.conf to long. Affected at least ldap indexes (ldap/index/{eq, approx, etc.})
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
PoC patch to automatically wrap index lines
univention-ldap.patch (text/plain), 1.35 KB, created by
Ingo Sieverdingbeck
on 2016-07-05 11:04:39 CEST
(
hide
)
Description:
PoC patch to automatically wrap index lines
Filename:
MIME Type:
Creator:
Ingo Sieverdingbeck
Created:
2016-07-05 11:04:39 CEST
Size:
1.35 KB
patch
obsolete
>diff --git a/univention-ldap/conffiles/etc/ldap/slapd.conf.d/40univention-ldap-server_database b/univention-ldap/conffiles/etc/ldap/slapd.conf.d/40univention-ldap-server_database >index d740833..491498d 100644 >--- a/univention-ldap/conffiles/etc/ldap/slapd.conf.d/40univention-ldap-server_database >+++ b/univention-ldap/conffiles/etc/ldap/slapd.conf.d/40univention-ldap-server_database >@@ -78,7 +78,27 @@ for indexcombination in indexcombinations: > attribs.append(attr) > found_attribs.append(attr) > if not attribs==[] and not indexes==[]: >- print 'index\t%s %s'%(','.join(attribs),','.join(indexes)) >+ config_line = 'index\t%s %s' % (','.join(attribs),','.join(indexes)) >+ max_length = 2000 >+ if len(config_line) > max_length: >+ head = 'index\t ' >+ tail = ' %s'%(','.join(indexes)) >+ attributes="" >+ for attr in attribs: >+ if not attributes: >+ # regardless of max length we print at least one attribute per index line >+ attributes += '%s' % (attr) >+ else: >+ if len('%s%s,%s%s' % (head, attributes, attr, tail)) > max_length: >+ print '%s%s%s' %(head, attributes, tail) >+ attributes='%s' % (attr) >+ else: >+ attributes += ',%s' % (attr) >+ if attributes: >+ print '%s%s%s' %(head, attributes, tail) >+ attributes='' >+ else: >+ print config_line > > print > for key in configRegistry.get("ldap/limits", "").split(";"):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 41648
:
7780
| 7784