Univention Bugzilla – Bug 34406
Missing ordering of LDAP schema
Last modified: 2014-09-15 12:33:11 CEST
Created attachment 5839 [details] Stable local-schema include file hhhorder ucs-3.2-1/management/univention-ldap/conffiles/etc/ldap/slapd.conf.d/25univention-ldap-server_local-schema just uses listdir(), which returns the files in any order. As LDAP attributes must be defined before there use and objectClasses also have an ordering constraint, this sometimes breaks the LDAP server, when dependent schema are included in the wrong order. 1. Use sorted(listdir(...)) to at least get a stable order 2. Allow schema files to start with two digits, which allows ordering. This prefix is ignored when checking for already included schema files. 3. Anchor schema RegExp and escape special characters 4. Convert "useless use of cat" into Python stdin=open(...) 5. Just read lines form stdout instead of first reading whole file. 6. Just parse templates once (instead of for each schema file) 7. Remove duplicate import os.path
(In reply to Philipp Hahn from comment #0) > 1. Use sorted(listdir(...)) to at least get a stable order As discussed, we need the sort part for Bug #34349.
r49270 univention-ldap: addresses 1 and 7, the other issues will be clones into a new bug. r49271: 2014-04-11-univention-ldap.yaml
Cleanup-part cloned to Bug #34533
r49344 | Bug #34406 LDAP: Sort schema files by name 3.2-0 The sorting has also been applied to UCS-3.2. The errata.yaml file has been update to ship the binary packages for both UCS-3.2-0 and UCS-3.2-1, as there are currently no other differences between those two releases.
* Ok, the files are now included in a sorted order. * Advisory Ok
http://errata.univention.de/ucs/3.2/103.html