Useless loop?

Naccarato, Robert naccarar at
Thu Nov 4 19:40:23 GMT 1999

I'm not a programmer.  I don't even pretend to be one.  But every now
and then I get the urge to look at some source to try and figure out
how things work...

During one of these urges, I was browsing the 2.0.5a source, and in
smbd/password.c, function setup_groups(), I see this:

DEBUG( 3, ( "%s is in %d groups: ", user, ngroups ) );
for (i = 0; i < ngroups; i++ )
        DEBUG( 3, ( "%s%d", (i ? ", " : ""), (int)groups[i] ) );
DEBUG( 3, ( "\n" ) );

If my log level <3 in smb.conf, then this loops for no apparent reason,
right?  If was trying to achieve better performance by reducing the logging
level, this will still impact me (well, no logging occurs, but smbd will
loop and, essentially do nothing in the loop)...

... or am I missing something glaringly obvious here?

(ps - I'm not subscribed to samba-technical).

More information about the samba-technical mailing list