[Date Prev][Date Next]
(ITS#4884) Back-config inheritance issue
Full_Name: Pierangelo Masarati
Version: HEAD (re23,...)
Submission from: (NULL) (188.8.131.52)
Submitted by: ando
I think I've spotted a potential issue in back-config. When creating a custom
object, say an overlay, the configuration objectClass should inherit from
olcOverlayConfig. While adding the object via LDAP, however, if the ancestor
class is not explicitly listed, the derived object must provide a co_ldadd()
hook, otherwise addition fails.
It would be more sound, IMHO, to have something like:
- if the structural objectClass provides a co_ldadd() hook, use it; it is that
hook's responsibility to call the superior's one if required;
- if it doesn't, then climb the inheritance tree and call co_ldadd() for the
first occurrence of a valid one.
In case of multiple inheritance, issues may arise. In those cases, we could:
- require an explicit co_ldadd() in the derived object to resolve the ambiguity
(this is basically what C++ does)
- otherwise, co_ldadd() should perhaps be called for the first occurrence in all
branches of multiple inheritance, and it should be able to either create the
entry, or modify an existing entry. handlers should be called in order of
Currently, the code uses all defined objectClasses and stops the first time a
hook is available and it does not fail.