Full_Name: Raphael Ouazana Version: 2.2.6 OS: Linux URL: ftp://ftp.openldap.org/incoming/raphael-ouazana-041209-patchDownloadSchema-2.2.6-1.6.patch Submission from: (NULL) (194.98.7.155) As discussed in openldap-software, this is a patch to download the schema of a remote LDAP server. It should work with at least with OpenLDAP 2.1, 2.2 and Sun Directory 4.16 and 5.2. I post it mainly to discuss for the moment, as it is not based on HEAD. But if you wish to integrate it like this, feel free :) TODO (at least) : 2.2.6 -> HEAD Translate comments from french to english Extended operation to reload the schema Legal notice : This patch file is derived from OpenLDAP Software. All of the modifications to OpenLDAP Software represented in this following patch were developed by Raphael Ouazana raphael.ouazana@linagora.com. These modifications are not subject to any license of Linagora. The attached modifications to OpenLDAP Software are subject to the following notice: Copyright 2004 Raphael Ouazana Redistribution and use in source and binary forms, with or without modification, are permitted only as authorized by the OpenLDAP Public License.
Raphael, I think your patch is really well contained, and can be of use to many people. My suggestion is to rearrange it as a dynamically loadable module; then all one needs to do is load it __after__ all schema reading (including loading those backends, modules and overlays that register schema items of their own). This would greatly simplify its use, and eliminate any merging problem with the main branch. You may move the config options to a list of args preceded by their name, much like in the replica/syncrepl statements, e.g. moduleload downloadschema.so uri=ldap://remote:389 binddn=cn=someone bindpw=secret ignore-unknown-syntaxes=yes One point I caught by quickly surfing your code is that you install very plain generic routines for processing unknown items. I think a better approach would be to use those of the "undefined" attributeType, that you find in slap_schema.si_at_undefined; it used to refer to the distinguishedName syntax, but recently, in HEAD, it was pointed to octetString, which is very neutral and may serve your purpose. I'd also add the possibility to ignore attributeTypes with undefined syntaxes. If you develop it as a module, I think we can host it in contrib/slapd-modules. I note the directory contrib/slapd-modules/dsaschema already contains a module that reads schema files; I don't see much difference from directly including those files in slapd.conf, but I might be missing something. You may follow that as a guideline; your module would add some value by performing the operation via LDAP. p. -- Pierangelo Masarati mailto:pierangelo.masarati@sys-net.it SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497
changed notes moved from Incoming to Contrib
Thank you for your comments. I'll try to do it as soon as I have a little time... Do you know if it is possible to download HEAD without CVS access ? Raphael Ouazana.
> > Thank you for your comments. I'll try to do it as soon as I have a > little time... > > Do you know if it is possible to download HEAD without CVS access ? Since all you need is a couple of files, you can use http://www.openldap.org/devel/cvsweb.cgi p. -- Pierangelo Masarati mailto:pierangelo.masarati@sys-net.it SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497
Hi, You can find the following files : ftp://ftp.openldap.org/incoming/raphael-ouazana-040128-downloadschema.c ftp://ftp.openldap.org/incoming/raphael-ouazana-040128-README The code has been tested with OpenLDAP 2.2.23 because I can't download HEAD. It seems to work with 2.3.0-alpha too although there are some warnings (ldap_search_s is deprecated ?). Raphael Ouazana.
changed notes
I was looking at this code in relation to current HEAD/RE24, and things have changed quite a bit. Given the ability to dynamically load schema into cn=config, is there still a need for this module? (It is in fact the changes made for dynamic schema manipulation in slapd that causes the compatibility issues with this module.) -- -- Howard Chu Chief Architect, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
Hi, Le Sam 15 décembre 2007 04:31, hyc@symas.com a écrit : > I was looking at this code in relation to current HEAD/RE24, and things have > changed quite a bit. Given the ability to dynamically load schema into cn=config, is there still a need for this module? (It is in fact the changes > made for dynamic schema manipulation in slapd that causes the > compatibility > issues with this module.) I don't use this module anymore. Dynamic schema loading would be useful to replace it by allowing replication of schema. In fact I see only a case where the module is still useful: when I want to get automatically the schema of some directory which is not very respectful of LDAP standards, for example by providing attributes without OID. Regards, Raphaël Ouazana.
candidate to contrib/slapd-modules module patch under review