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

(ITS#4089) slapcat includes subordinate databases when -n or -b used



Full_Name: Kevin Spicer
Version: 2.3.11
OS: linux / Solaris 9
URL: 
Submission from: (NULL) (213.152.53.60)


When there are subordinate databases defined in slapd.conf attempting to dump
the contents of the parent database using slapcat -n or slapcat -b also includes
the contents of the subordinate databases.

I've seen this behaviour on all openldap versions tested  (various from around
2.2.15 to current).

To recreate...

Create a slapd.conf with database definitions like the following
(simplified)...

##### START ######
database bdb
suffix "ou=sub1,dc=domain,dc=com"
directory /var/db/sub1
subordinate

database bdb
suffix "ou=sub2,dc=domain,dc=com"
directory /var/db/sub2
subordinate

database bdb
suffix "dc=domain,dc=com"
directory /var/db/main
#####  END  ######

Populate the databases.

Now
slapcat -n 1   OR   slapcat -b "ou=sub1,dc=domain,dc=com"
returns only the contents of the sub1 database
slapcat -n 2   OR   slapcat -b "ou=sub2,dc=domain,dc=com"
returns only the contents of the sub2 database
BUT
slapcat -n 3   OR   slapcat -b "dc=domain,dc=com" 
returns the contents of all three databases