Issue 3765 - Leaf or non-leaf? That's the question...
Summary: Leaf or non-leaf? That's the question...
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-10 12:13 UTC by Michael Ströder
Modified: 2014-08-01 21:06 UTC (History)
0 users

See Also:


Attachments
test-recursive-delete.dnlist (730 bytes, text/plain)
2005-06-11 13:45 UTC, Michael Ströder
Details
test-recursive-delete.ldif (1.40 KB, text/plain)
2005-06-11 13:45 UTC, Michael Ströder
Details

Note You need to log in before you can comment on or make changes to this issue.
Description Michael Ströder 2005-06-10 12:13:25 UTC
Full_Name: Michael Str�der
Version: OPENLDAP_REL_ENG_2_3
OS: SuSE Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (83.121.39.239)


There are entries in my database hdb which can't be deleted since they are not
leafs but I can't see any entries below. I even tried to reload the whole
database but this didn't help either.

See yourself:

$ ldapdelete "ou=test311,ou=test31,ou=test3,ou=recursive
delete,ou=Testing,dc=stroeder,dc=de"       
SASL/EXTERNAL authentication started
SASL username: uidNumber=500+gidNumber=100,cn=peercred,cn=external,cn=auth
SASL SSF: 0
Delete Result: Operation not allowed on non-leaf (66)
Additional info: subordinate objects must be deleted first

$ ldapsearch -L -b"ou=test311,ou=test31,ou=test3,ou=recursive
delete,ou=Testing,dc=stroeder,dc=de" -s one
SASL/EXTERNAL authentication started
SASL username: uidNumber=500+gidNumber=100,cn=peercred,cn=external,cn=auth
SASL SSF: 0
version: 1

#
# LDAPv3
# base <ou=test311,ou=test31,ou=test3,ou=recursive
delete,ou=Testing,dc=stroeder,dc=de> with scope oneLevel
# filter: (objectclass=*)
# requesting: ALL
#

# search result

# numResponses: 1

Comment 1 Michael Ströder 2005-06-10 13:09:52 UTC
Additional info: It does not seem to happen with back-bdb.

Maybe when deleting entries back-hdb does not update the subordinate flags?

Comment 2 Howard Chu 2005-06-10 23:07:55 UTC
michael@stroeder.com wrote:
> Additional info: It does not seem to happen with back-bdb.
>
> Maybe when deleting entries back-hdb does not update the subordinate flags?
>   
Yes, I guess that's possible. I haven't seen the problem here though; 
can you send a test case to reproduce the situation?
-- 
  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

Comment 3 Michael Ströder 2005-06-11 13:45:49 UTC
Howard Chu wrote:
> michael@stroeder.com wrote:
> 
>> Additional info: It does not seem to happen with back-bdb.
>>
>> Maybe when deleting entries back-hdb does not update the subordinate
>> flags?
>>   
> 
> Yes, I guess that's possible. I haven't seen the problem here though;
> can you send a test case to reproduce the situation?

See attachments and the following commands:

$ ldapadd -x -D "cn=root,dc=testing,dc=stroeder,dc=com" -w pest -f
~/tmp/test-recursive-delete.ldif

$ ldapdelete -x -r -D "cn=root,dc=testing,dc=stroeder,dc=com" -w pest -f
test-recursive-delete.dnlist
Delete Result: Operation not allowed on non-leaf (66)
Additional info: subordinate objects must be deleted first

Note that the log shows it e.g. fails at
ou=test1,ou=recursive delete,dc=testing,dc=stroeder,dc=com

But no search results below this node:

$ ldapsearch -x -D "cn=root,dc=testing,dc=stroeder,dc=com" -w pest -b
"ou=test1,ou=recursive delete,dc=testing,dc=stroeder,dc=com" -s one
"(objectClass=*)"
# extended LDIF
#
# LDAPv3
# base <ou=test1,ou=recursive delete,dc=testing,dc=stroeder,dc=com> with
scope oneLevel
# filter: (objectClass=*)
# requesting: ALL
#

# search result
search: 2
result: 0 Success

# numResponses: 1

$ ldapdelete -x -r -D "cn=root,dc=testing,dc=stroeder,dc=com" -w pest
"ou=test1,ou=recursive delete,dc=testing,dc=stroeder,dc=com"
Delete Result: Operation not allowed on non-leaf (66)
Additional info: subordinate objects must be deleted first

Ciao, Michael.

-- 
Michael Ströder
E-Mail: michael@stroeder.com
http://www.stroeder.com

-------------------------- Excerpt slapd.conf --------------------------
#######################################################################
# dc=testing,dc=stroeder,dc=com
#######################################################################

database	hdb

schemacheck on

#checkpoint 200 5

# Entries to cache in memory
cachesize 1000

# Search results to cache in memory
idlcachesize 100

suffix		"dc=testing,dc=stroeder,dc=com"
directory	/var/openldap/2.3/testing.stroeder.com
rootdn		"cn=root,dc=testing,dc=stroeder,dc=com"
rootpw		pest
lastmod		on

sizelimit	-1
Comment 4 Howard Chu 2005-06-11 17:15:15 UTC
changed notes
changed state Open to Test
Comment 5 Howard Chu 2005-06-11 17:15:22 UTC
moved from Incoming to Software Bugs
Comment 6 Howard Chu 2005-06-11 17:27:55 UTC
Thanks, this is now fixed in HEAD (back-bdb/idl.c). By the way, your 
test stops at the 3rd DN in the list, since it was already removed by 
recursively deleting the 2nd DN.

Michael Ströder wrote:
> See attachments and the following commands:
> ------------------------------------------------------------------------
>
> ou=test0,ou=recursive delete,dc=testing,dc=stroeder,dc=com
> ou=test1,ou=recursive delete,dc=testing,dc=stroeder,dc=com
> ou=test11,ou=test1,ou=recursive delete,dc=testing,dc=stroeder,dc=com
>   

-- 
  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

Comment 7 Kurt Zeilenga 2005-06-14 01:41:40 UTC
changed state Test to Closed
Comment 8 Howard Chu 2009-02-17 05:11:44 UTC
moved from Software Bugs to Archive.Software Bugs
Comment 9 OpenLDAP project 2014-08-01 21:06:36 UTC
fixed in HEAD