[PATCH] Support Setup[SetupCount] values in nttrans response packets

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Jun 20 09:34:21 GMT 2008

On Fri, Jun 13, 2008 at 06:19:09PM +1000, David Disseldorp wrote:
> send_nt_replies currently sets SetupCount to zero, however some packets
> require different values. When testing FSCTL_RECALL_FILE, Windows XPsp2
> was observed dropping connections where SetupCount was not one in the server
> response.
> The SNIA CIFS documentation also describes NT_TRANSACT_IOCTL server response
> packets as having a SetupCount of 1.

Looking at send_nt_replies I've got some points:

First a purely stylistic, trivial one: We're trying to
standardize on uint16_t, not uint16 these days. For new code
that should be the the one to use.

Then another stylistic one: The do {} while variant of a
loop is a bit cumbersome to read. Can we turn that into the
old form again?

And then a real question: You seem to send the setup
portion of the reply in every partial nttrans reply packet.
Is that the right way to do? I don't know how to trigger
that with Windows, but it looks wrong to me.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20080620/5868aa4c/attachment.bin

More information about the samba-technical mailing list