[Date Prev][Date Next] [Chronological] [Thread] [Top]

Subentry woes


Some time back, I was working on storing replica information in LDAP as
subentries. I had put the project on the back burner because of other
commitments but have started on it again. I was using ldbm as the backend
earlier but switched to bdb now. 

I assume BDB support for subentries is incomplete; I notice that 
BDB_SUBENTRIES is not defined any where in the code. I am willing to live
with some experimental code, so I enabled it. I immediately ran into some
minor trouble. The following patch fixes the problem

diff -u -r1.30 passwd.c
--- servers/slapd/back-bdb/passwd.c     2002/03/30 07:44:29     1.30
+++ servers/slapd/back-bdb/passwd.c     2002/04/01 08:46:31
@@ -172,7 +172,7 @@
-       if( is_entry_subentries( e ) ) {
+       if( is_entry_subentry( e ) ) {
                /* entry is an alias, don't allow operation */
                *text = "authorization entry is subentry";
                rc = LDAP_OTHER;

Now for my actual problem; I have defined a replicaSubEntry-2 object class
that has subentry as it's super class. When I try to add the entry slapd
complains about missing attribute "subtreespecification". However, when I
try to define an empty attribute for it (which should implicitly define the
scope to the current context) I get an error. When I try to give an explicit
context, I get an error saying that the attribute should be binary. What am
I doing wrong?

As a side note, I really like the strict schema checking that OpenLDAP does
right now. It feels more "robust" :-). Thanks for whoever did the work.