r7782: fixed an ordering problem with smb requests. I found this when I had "sam...
authorAndrew Tridgell <tridge@samba.org>
Mon, 20 Jun 2005 08:47:52 +0000 (08:47 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:18:36 +0000 (13:18 -0500)
commit45487e8a1402c64d1c314befe8bd9f65587fd0d6
tree32e7dede8b8355216b41625b935dbf71f47b7b89
parent5760ed20eed509b0b6e09e78c942dd0f70350fa9
r7782: fixed an ordering problem with smb requests. I found this when I had "sam database"
set to the internal ldap server over loopback. The following happened:

  - DCERPC_AUTH3 request
     - auth requests calls ldb
     - ldb calls ldap
     - ldap calls our internal ldap server, triggering events
  - samrConnect from client
     - connect refused
  - SMBclose from client
     - causes dcerpc_pipe to be destroyed
  - AUTH3 continues
     - dies on freed pipe

I chose this solution as it provides a guarantee that backends only have to think about
async issues when they mark a request async. When they don't, this code guarantees that
a second request won't happen on the same connection while processing the first one
source/smb_server/smb_server.c
source/smb_server/smb_server.h