torture4's smb2.compound test seems wrong or Samba 3.6.X is wrong in its handling of subsequent responses after and error in a compound request

Jeremy Allison jra at samba.org
Wed Jan 30 14:07:57 MST 2013


On Wed, Jan 30, 2013 at 01:04:17PM -0800, Richard Sharpe wrote:
> Hi folks,
> 
> I was running the smb2.compound test from torture4 in the master branch.
> 
> It fails in source4/torture/smb2/compound.c:test_compound_unrelated
> saying that it got an NT_STATUS_INVALID_PARAMETER when it expected
> NT_STATUS_FILE_CLOSED.
> 
> The code is:
> 
>         ZERO_STRUCT(cl);
>         cl.in.file.handle = hd;
>         req[1] = smb2_close_send(tree, &cl);
>         req[2] = smb2_close_send(tree, &cl);
>         req[3] = smb2_close_send(tree, &cl);
>         req[4] = smb2_close_send(tree, &cl);
> 
>         status = smb2_create_recv(req[0], tree, &cr);
>         CHECK_STATUS(status, NT_STATUS_OK);
>         status = smb2_close_recv(req[1], &cl);
>         CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);
>         status = smb2_close_recv(req[2], &cl);
>         CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);  // Fails here
>         status = smb2_close_recv(req[3], &cl);
>         CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);
>         status = smb2_close_recv(req[4], &cl);
>         CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);
> 
> This fails against Samba 3.6.X because in
> source3/smbd/smb2_server.d:smbd_smb2_request_error_ex when an error
> occurs, we set req->next_status to NT_STATUS_INVALID_PARAMETER.
> 
> One of them must be wrong. Does anyone know which off the top of their heads?

Unfortunately I think this is one of those that varies across
different Windows releases, so there's no single "right"
answer.

Jeremy.


More information about the samba-technical mailing list