Debugging NSS_WRAPPER in the samba test environment.

Andrew Bartlett abartlet at samba.org
Mon Aug 10 00:43:19 UTC 2015


On Mon, 2015-07-27 at 13:23 -0700, Jeremy Allison wrote:
> On Mon, Jul 27, 2015 at 01:13:30PM -0700, Jeremy Allison wrote:
> > I'm trying to debug a test case I'm writing,
> > and I'd really like to see the debug test
> > messages from NSS_WRAPPER.
> > 
> > So I tried adding 
> > 
> > $ENV{NSS_WRAPPER_DEBUGLEVEL} = 10;
> > 
> > to the startup scripts for smbd and winbindd in
> > selftest/target/Samba3.pm, but don't see any
> > NWRAP_XXX messages in any logs, or in the
> > stdout.
> > 
> > Anyone know how to get lib/nss_wrapper/nss_wrapper.c
> > debug to work ?
> 
> Oh, I found it...
> 
> Inside lib/uid_wrapper/wscript we have:
> 
> def build(bld):
>     if not bld.CONFIG_SET("USING_SYSTEM_UID_WRAPPER"):
>         # We need to do it this way or the library wont work.
>         # Using private_library=True will add symbol version which
>         # breaks preloading!
>         bld.SAMBA_LIBRARY('uid_wrapper',
>                           source='uid_wrapper.c',
>                           cflags='-DNDEBUG',
>                           deps='dl',
>                           install=False,
>                           realname='libuid-wrapper.so')
> 
> It's the cflags='-DNDEBUG' that does it :-(.
> 
> Any chance we can add a configure option that
> turns this off (not sure how to waf-ify that :-) ?

Here is the patch to do that.

Andreas,

If this is OK for you, can you review please?

Andrew Bartlett

-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba




-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-build-Build-_wrapper-without-DNDEBUG-for-in-tree-use.patch
Type: text/x-patch
Size: 4449 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150810/b20a6c81/0001-build-Build-_wrapper-without-DNDEBUG-for-in-tree-use.bin>


More information about the samba-technical mailing list