session setup bugfix and torture test
Jeremy Allison
jra at samba.org
Sat Sep 21 02:43:53 CEST 2013
On Fri, Sep 20, 2013 at 11:41:38AM +0200, Stefan (metze) Metzmacher wrote:
> Hi Michael,
>
> I think this changes are a good start, but I try to
> fix this more broadly similar to this change
>
> commit e6a58d370403e818bc2cfb8389751b78adcc14fd
> Author: Stefan Metzmacher <metze at samba.org>
> Date: Tue Jul 9 16:38:59 2013 +0200
>
> s4:rpc_server: make sure we don't terminate a connection with
> pending requests (bug #9820)
>
> Sadly we may have nested event loops, which won't work correctly with
> broken connections, that's why we have to do this...
>
> Signed-off-by: Stefan Metzmacher <metze at samba.org>
> Reviewed-by: Andrew Bartlett <abartlet at samba.org>
>
> Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
> Autobuild-Date(master): Wed Jul 10 08:47:38 CEST 2013 on sn-devel-104
>
> The goal should be that we move any session, tcon and open to a deleted list
> on the connection and just mark them as deleted like this
>
> session->status = NT_STATUS_USER_SESSION_DELETED;
> tcon->status = NT_STATUS_NETWORK_NAME_DELETED;
> open->status = NT_STATUS_FILE_CLOSED;
>
> And do through all pending request which match the closed object
> and do tevent_req_cancel(smb2req->subreq);
>
> Before we process any new incoming request, we would scan the deleted lists
> and clean the objects up if they aren't used anymore.
I think this the right fix ultimately for master, but for the initial
fix which we also want to put into 4.0.x and 4.1.0 then a lesser
changeset is probably a good start.
More when I have time to look over the changes !
Cheers,
Jeremy.
More information about the samba-technical
mailing list