Failed to get name_resolve_order via s3 lpcfg wrapper and improving s3 ldap import

Andrew Bartlett abartlet at
Sat Jul 14 05:26:32 MDT 2012

On Sat, 2012-07-14 at 13:13 +0200, Gémes Géza wrote:
> 2012-07-14 12:10 keltezéssel, Andrew Bartlett írta:
> > On Sat, 2012-07-14 at 09:35 +0200, Gémes Géza wrote:
> >
> >> Hi,
> >>
> >> Unfortunately you lose. It is running without problem, except the
> >> ldb=samDB line and below (which is part of a function called for every
> >> user to be migrated). The only (seems to be a red herring) error message
> >> is at the beginning of the execution: no talloc stackframe around,
> >> leaking memory
> >> and valgrind reports lots of memory leaks in (seems to be) unrelated
> >> functions, but tested with a pristine and the situation seems
> >> to be the same.
> > Perhaps at this point send me the patch and I'll see what I can do to
> > help out.
> >
> > Andrew Bartlett
> >
> Hi,
> Now with import (in of SamDB and system_session it gets even 
> more interesting. Now it fails.
> Under gdb it produces:
> Starting program: /usr/bin/python /usr/local/samba/bin/samba-tool domain 
> classicupgrade --dbdir=/tmp/samba_tdb/ --use-xattrs=yes 
> --realm=KZSDABAS.HU /tmp/smb.conf.reg
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/".
> no talloc stackframe around, leaking memory
> Reading smb.conf
> Provisioning
> Exporting account policy
> Exporting groups
> Exporting users
> PANIC: assert failed at ../lib/param/loadparm.c(1540): 
> lp_ctx->s3_fns->name_resolve_order
> PANIC (pid 2513): assert failed: lp_ctx->s3_fns->name_resolve_order

Thanks, that gives me the detail I need.  I'll see what I can do to fix
that up, it's a limitation in the loadparm system.  However, you can
work around this limitation.

In this case, there are two different loadparm contexts that are valid.
instead of 


(where result is the result of provision).  Also, don't open the ldap DB
on each entry, open it once before starting the iteration and re-use the

Also, use Ldb not SamDB (as this isn't a AD-like database).  

I hope this helps,

Andrew Bartlett

Andrew Bartlett                      
Authentication Developer, Samba Team 

More information about the samba-technical mailing list