Differences in LDB and LDAP behavior

William Jojo jojowil at hvcc.edu
Thu Jun 10 00:45:36 GMT 2004



Since the object's immediate children were the scope criteria (-s one), I
would venture the ldb search results are incorrect.


Bill


On Thu, 10 Jun 2004, Jelmer Vernooij wrote:

>
> Hi Tridge,
>
> While working on the LDB registry backend (got read-only support
> almost working!), I noticed a difference between ldapsearch and
> ldbsearch. I'm not sure which of the two is actually broken (or
> perhaps this is caused by my limited knowledge of LDAP...).
>
> ldapsearch -Y GSSAPI -s one -b ou=Machines,dc=vernstok,dc=nl "(objectClass=*)"
>
> SASL/GSSAPI authentication started
> SASL username: jelmer at VERNSTOK.NL
> SASL SSF: 56
> SASL installing layers
> # extended LDIF
> #
> # LDAPv3
> # base <ou=Machines,dc=vernstok,dc=nl> with scope one
> # filter: (objectClass=*)
> # requesting: ALL
> #
>
> # charis, Machines, vernstok.nl
> dn: uid=charis,ou=Machines,dc=vernstok,dc=nl
> uid:: Y2hhcmlzIA==
> objectClass: account
> objectClass: top
>
> # search result
> search: 4
> result: 0 Success
>
> # numResponses: 2
> # numEntries: 1
>
> Now with ldbsearch:
>
> ldbsearch -s one -H tdb://foo.tdb -b ou=Machines,dc=vernstok,dc=nl
> "(objectClass=*)"
>
> # returned 2 records
> # record 1
> dn: ou=Machines,dc=vernstok,dc=nl
> objectClass: top
> objectClass: organizationalUnit
> ou: Machines
>
> # record 2
> dn: uid=charis,ou=Machines,dc=vernstok,dc=nl
> uid:: Y2hhcmlzIAA=
> objectClass: account
> objectClass: top
>
> As you can see, ldbsearch returns the basedn we're searching as well.
> (the ldap database and the tdb database contain the same records)
>
> Cheers,
>
> Jelmer
>
> --
> Jelmer Vernooij <jelmer at samba.org> - http://jelmer.vernstok.nl/
>  02:09:44 up 15 days,  2:24,  5 users,  load average: 5.31, 5.55, 5.65
>


More information about the samba-technical mailing list