Patch: Make sure smbtorture tests can run when min protocol is above NT1!

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Patch: Make sure smbtorture tests can run when min protocol is above NT1!

Samba - samba-technical mailing list
Hi folks,

It took a freaking day to find why my smbtorture run failed.

Attached is a patch that ensures we do not call smbXcli_negprot_send
with a min protocol larger than max protocol.

--
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)

0001-Make-sure-smbtorture-tests-can-run-if-someone-has-se.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Patch: Make sure smbtorture tests can run when min protocol is above NT1!

Samba - samba-technical mailing list
On Sun, Sep 10, 2017 at 12:55:23PM -0700, Richard Sharpe via samba-technical wrote:
> Hi folks,
>
> It took a freaking day to find why my smbtorture run failed.
>
> Attached is a patch that ensures we do not call smbXcli_negprot_send
> with a min protocol larger than max protocol.

This *looks* right, but can you give some more
context on what screwed up and why ?

Reply | Threaded
Open this post in threaded view
|

Re: Patch: Make sure smbtorture tests can run when min protocol is above NT1!

Samba - samba-technical mailing list
On Mon, Sep 11, 2017 at 4:11 PM, Jeremy Allison <[hidden email]> wrote:

> On Sun, Sep 10, 2017 at 12:55:23PM -0700, Richard Sharpe via samba-technical wrote:
>> Hi folks,
>>
>> It took a freaking day to find why my smbtorture run failed.
>>
>> Attached is a patch that ensures we do not call smbXcli_negprot_send
>> with a min protocol larger than max protocol.
>
> This *looks* right, but can you give some more
> context on what screwed up and why ?

Yeah. I was trying to run smbtorture on a system where we had set
client min protocol = SMB2_10 and was running the raw.sfileinfo test,
but it kept failing with STATUS_BAD_PARAMETER_MIX or something like
that.

It turned out that in smbXcli_negprot_send we check that both min
protocol and max protocol are reasonable (and that min is not larger
than max) but smb_raw_negotiate_send allows us to send min protocol >
max protocol.

--
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)