Debugging NSS_WRAPPER in the samba test environment.

Jeremy Allison jra at samba.org
Mon Jul 27 20:23:23 UTC 2015


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 :-) ?



More information about the samba-technical mailing list