Add/Delete failures?

Eyal Schwartz (eyals@microsoft.com)
Tue, 18 Jun 1996 13:39:40 -0700

Hi,

I'll appreciate any help regarding the following problem:

-Description
1. DN Add/Delete operations are not visible via ldapsearch although
ldap_add/ldap_delete
return codes indicate successfull operation (neither ldap_search API nor
ldapsearch
utility).
When I use the ldapadd utility then they are visible to ldapsearch, but
if I understand
correctly, ldapadd is implemented calling ldap_add with mod_bvalues and
never
with mod_values.

2. Deleting a node that had children in the past (that were already
removed) fails with
error 66 (node is not a leaf).
If I quit the server, and view the database using ldbmtest I don't see
any children to
that node. (I can't delete the node using the ldapdelete utility
neither).
(I reproduced this scenario using the ldapadd/ldapdelete utilities as
well).

-Environment
*Server: Ldap 3.3 (slapd), on Linux (most recent slackware). (X86).

*Database: gdbm (standard installation, schema is off).

*Client: Ldap32.dll API set on WindowsNT (I also compiled and run the
test
on the server, and got the same results).

*Data:
dn: cn=root,o=org,c=US
cn: root
objecclass=Tree

dn: cn=child, cn=root,o=org,c=US
cn: child
objecclass=Tree

dn: cn=child2, cn=root,o=org,c=US
cn: child2
objecclass=Tree

*Scenario:
// add dn with serveral attributes including objectclass
// all calls return expected code (success)
ldap_add_s(..."cn=root, o=org, c=US")
ldap_add_s(..."cn=child, cn=root, o=org, c=US")
ldap_add_s(..."cn=child2, cn=root, o=org, c=US")
ldap_delete_s(..."cn=child2, cn=root, o=org, c=US")
// Problem 1) search always return empty list
ldap_search_s(..."(objectclass=*)")
//Problem 2)
ldap_delete_s(..."cn=child, cn=root, o=org, c=US")
// Always fails with error 66 "Operation not allowed on non-leaf"
ldap_delete_s(..."cn=root, o=org, c=US")

I believe that these are trivial operations, hence I assume that I'm
doing something
wrong. I would appreciate your advise.

Thanks,

Eyal