Andrew Bartlett abartlet at
Sun Feb 17 13:34:02 GMT 2002

Martin Pool wrote:
> I thought I would take a quick look at where smb_read_error is used in
> Samba, after the recent confusion about when errors should be assigned
> to it.

Global Variables Suck. :-)

> This global is used from quite a few different places in Samba.  This
> graph shows the nontrivial references:
> Broadly, it seems to mean "what went wrong while reading the last
> request", but it's not quite that simple.  I wonder if it might not
> make the code more robust against future changes if we would do better
> to get rid of it and just use return codes to indicate errors instead.
> After a bit of study it looks like that would work reasonably in every
> case in which it's called.
> Does that sound like a good idea?

I'm all for it.

Andrew Bartlett                                 abartlet at
Manager, Authentication Subsystems, Samba Team  abartlet at
Student Network Administrator, Hawker College   abartlet at

More information about the samba-technical mailing list