LDB_SCOPE_ONELEVEL without full traversal?

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Dec 6 22:59:25 GMT 2006


On Thu, Dec 07, 2006 at 09:46:52AM +1100, tridge at samba.org wrote:
> Why do you need an EnumValue call on tconx?

Simple: I want a registry key per [smbshare] definition, and
I want all parameters in that share definition (i.e.
registry values). And if you look at for example the
lanmanserver\shares key in a real windows registry, you will
see a secdesc as binary value per share. So putting all
values into a single tdb record just will not work.

>  > It's not the huge databases, it's that *many* calls to the
>  > non-indexed search might be necessary.
> 
> ok, so can you give me an example of where this onelevel search will
> happen with other than a GUI application doing a tree walk?

The data model Jelmer has chosen and which I find quite sane
looks like:

dn: cn=regshare,cn=smbconf,cn=samba,cn=software,cn=hklm
cn: regshare
objectclass: sambaRegistryKey
distinguishedName: cn=regshare,cn=smbconf,cn=samba,cn=software,cn=hklm

dn: cn=max connections,cn=regshare,cn=smbconf,cn=samba,cn=software,cn=hklm
cn: max connections
objectclass: sambaRegistryValue
sambaRegvalDword: 5
distinguishedName: cn=max connections,cn=regshare,cn=smbconf,cn=samba,cn=software,cn=hklm

dn: cn=valid users,cn=regshare,cn=smbconf,cn=samba,cn=software,cn=hklm
cn: valid users
objectclass: sambaRegistryValue
sambaRegvalSz: /data/tmp1
distinguishedName: cn=valid
users,cn=regshare,cn=smbconf,cn=samba,cn=software,cn=hklm

dn: cn=path,cn=regshare,cn=smbconf,cn=samba,cn=software,cn=hklm
cn: path
objectclass: sambaRegistryValue
sambaRegvalSz: /data/tmp1
distinguishedName: cn=path,cn=regshare,cn=smbconf,cn=samba,cn=software,cn=hklm

And so on. You get the idea. So we have to do a onelevel
search on
cn=regshare,cn=smbconf,cn=samba,cn=software,cn=hklm to get
all the smb.conf values that belong to the registry key that
represents [regshare].

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20061206/dd7f3b5f/attachment.bin


More information about the samba-technical mailing list