Handling secrets.tdb in upgrade.py for classicupgrade

Gémes Géza geza at kzsdabas.hu
Mon Jul 16 07:25:27 MDT 2012

2012-07-16 12:00 keltezéssel, Andrew Bartlett írta:
> On Mon, 2012-07-16 at 19:05 +1000, Andrew Bartlett wrote:
>> On Mon, 2012-07-16 at 07:57 +0200, Gémes Géza wrote:
>>> Hi,
>>> I've attached the patch. Under valgrind the whole samba-tool
>>> classicupgrade gives a lot of memory problems related messages, and even
>>> fails at initializing the ldb connection to the openldap directory. The
>>> output is:
>> A few thoughts on the patch.
>> Why do you build multiple ldbs?  You should only need one - feel free to
>> walk the list of URLs if you think that one of the ldap hosts might be
>> down, but you should end up with just one ldb for posix attributes.
>> Use creds.set_bind_dn() rather than set_username() to set the simple
>> bind DN.
>> Also try applying this patch to the pytdb layer to see if we can trace
>> where this segfault comes from.
> The segfault should be fixed by this patch.
> Also, you need to do all your secrets_db access before this line:
>      # We must close the direct pytdb database before the C code loads it
>      secrets_db.close()
> I know it's a bit awkward, but it's a limitation of tdb.  With the patch
> attached, at least it will error rather than segfault.
> Thank you very much for your patience with this.  Hopefully after this
> the API will be safer for everyone.
> Andrew Bartlett

Thank you I've started implementing your suggestions, but one thing is 
not clear: How to check if an ldap server is reachable without building 
an ldb object for it?

Thank you in advance



More information about the samba-technical mailing list