This patch attemptes to clean up winbindd's mutex locking.
authorAndrew Bartlett <abartlet@samba.org>
Tue, 11 Mar 2003 11:28:59 +0000 (11:28 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 11 Mar 2003 11:28:59 +0000 (11:28 +0000)
commit0620320002082298a15cbba72bd79aecfc607947
treee78feb4cc997989b7b973ce6902a5f743e499775
parentf6497fd639c5bb7d61eda0286c4c3c38609933b0
This patch attemptes to clean up winbindd's mutex locking.

The current locking scheme in winbind is a complete mess - indeed, the
next step should be to push the locking into cli_full_connection(), but
I'll leave it for now.

This patch works on the noted behaviour that 2 parts of the connection
process need protection - and independent protection.  Tim Potter did
some work on this a little while back, verifying the second case.

The two cases are:
 - between connect() and first session setup
 - during the auth2 phase of the netlogon pipe setup.

I've removed the counter on the lock, as I fail to see what it gains us.

This patch also adds 'anonymous fallback' to our winbindd -> DC connection.

If the authenticated connection fails (wbinfo -A specifed) - say that
account isn't trusted by a trusted DC - then we try an anonymous.

Both tpot and mbp like the patch.

Andrew Bartlett
source/lib/server_mutex.c
source/nsswitch/winbindd_cm.c
source/passdb/secrets.c