[PATCH] Fix smbclient regression not printing session setup anymore
metze at samba.org
Wed Jun 7 18:07:20 UTC 2017
>> We used to pass 'inhdr' to smb_bytes_talloc_string() before,
>> that way we got the alignment correct as the unicode characters
>> are aligned to the beginning of the SMB request buffer.
> Yep, I remember having to get that right a *LOOONG* time
> ago - that's why an alarm went off in a dim reptillian
> part of my brain when I first looked at the patch :-) :-).
>> In smb_bytes_pull_str() is designed to pull the string
>> just from the "bytes" part of the SMB request, which starts
>> at an odd offset relative to the start of the complete SMB request
>> buffer. I'm not 100% sure if that's also the case for chained requests,
>> but at least samba aligns the wct field of subsequent requests to a
>> 4-byte boundary, see smb_splice_chain() and smb1cli_req_chain_submit().
>> The attached patch should improve this, but it would be better to have
>> a regression test. I try to write a cmocka test for it with
>> Andreas in the next days.
> I'll review (and push if happy) the attached patch shortly.
Please only review and I'll sort out the details of the used
BUG: reference with Andreas tomorrow.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: OpenPGP digital signature
More information about the samba-technical