s3: Make winbind recover from a signing error
authorVolker Lendecke <vl@samba.org>
Thu, 18 Nov 2010 12:28:47 +0000 (13:28 +0100)
committerVolker Lendecke <vlendec@samba.org>
Thu, 18 Nov 2010 14:48:18 +0000 (14:48 +0000)
When winbind sees a signing error on the smb connection to a DC (for whatever
reason, our bug, network glitch, etc) it should recover properly. The "old"
code in clientgen.c just closed the socket in this case. This is the right
thing to do, this connection is spoiled anyway. The new, async code did not do
this so far, which led to the code in winbindd_cm.c not detect that we need to
reconnect.

source3/libsmb/async_smb.c

index 0aaeea28270ce01b8948def37a8fc55549daf895..b04c274b9d29d72fdeae28927a6f2f9020301ba8 100644 (file)
@@ -702,6 +702,8 @@ static void cli_smb_received(struct tevent_req *subreq)
                DEBUG(10, ("cli_check_sign_mac failed\n"));
                TALLOC_FREE(inbuf);
                status = NT_STATUS_ACCESS_DENIED;
+               close(cli->fd);
+               cli->fd = -1;
                goto fail;
        }