"net -d 10" does not work anymore

Andrew Bartlett abartlet at samba.org
Sun Nov 21 03:39:34 MST 2010


On Sun, 2010-11-21 at 11:19 +0100, Volker Lendecke wrote:
> On Sun, Nov 21, 2010 at 11:24:47AM +1100, tridge at samba.org wrote:
> > The problem is that the parsing of -d on the command line uses the
> > same lp_set_cmdline() call. A 2nd lp_set_cmdline() when libnet is
> > initialised overrides a previous call, whereas with the old code the
> > command line set had a higher precedence, so if the command line was
> > parsed before the AllowDebugChange code was run, then the command line
> > debug level was still used.
> 
> What I'm getting is that AllowDebugChange is gone and we now
> have to manually make sure that the cases this was supposed
> to protect against are not violated? Wouldn't it be easier
> to introduce AllowDebugChange again?

Volker,

I think you will see with the patch I posted shortly before your mail
that the interaction between libnet and net was actually far more
egregious than just the debug system.  It reloaded everything -
including the case tables (which for some reason don't auto-init and
don't free any existing case table) and the smb.conf file.

But yes, the new code avoids using a magic global variable to prevent
changing the debug level in the smb.conf handling (which then had to be
unset for numerous cases where we really did want to change it).  

This not only makes the API clearer, it ensures that the debug level
value stored in the parameter table is actually the level being used by
the codebase. 

Andrew Bartlett
-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20101121/d15f7d43/attachment.pgp>


More information about the samba-technical mailing list