another patches for net_ads.c

Gerald (Jerry) Carter jerry at samba.org
Thu Aug 3 16:56:51 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael,

> I am working on an enhanced error reporting of the
> net-utility, especially the "net ads join" portion.
> 
> As a first step I changed all the DEBUG calls in
> utils/net_ads.c into d_printf calls, since my feeling
> was that the stuff that is output from the commandline
> utility directly should not be clobbered with the
> debug headers. (And the code in net_ads.c is not
> used elsewhere in samba.) I use a macro (in a possibly
> slightly clumsy manner) to obey the debug levels.
> 
> Any opinions about this?

Some of the DEBUG level 0 messages probably should
be moved to d_printf()'s.  Others might need to be
d_fpritnf(stderr,"..") instead.  I think anything
about 0 should stay with the DEBUG macro.

> I also changed the error code returned by
> libads/ldap.c:ads_connect if no dc was found in a more
> appropriate one (the old one resulted in a "no such
> file or directory" message).

That's probably a good idea.

> As a next step, I am thinking about a way to hand 
> the reason for the failure of the domain join action
> down to the net_ads_join code, so that a meaningful
> message can be printed at the end. To me, the most obvious,
> easy and ugly method for this would be the use of some 
> global variable.

I support the idea of helpful error message propagation
but I think using globals will be really hard to maintain.
If you can do this without introducing more globals it
would be best.

Do you want to rework the patches some?  or should
I cherry pick?





cheers, jerry
=====================================================================
Samba                                    ------- http://www.samba.org
Centeris                         -----------  http://www.centeris.com
"What man is a man who does not make the world better?"      --Balian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE0irTIR7qMdg1EfYRAlJWAKC+Z0VcUnfEcnb56iS3F3O83FiFXgCdEA0Q
4PX/I+W74Wq5bJF4aqPZpdk=
=QojF
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list