smbXcli infrastructure to handle smb1 and smb2

Stefan (metze) Metzmacher metze at samba.org
Fri Nov 4 10:38:28 MDT 2011


Hi Jeremy,
hi Volker,

here's my branch that implements a common client infrastructure that
handles smb1 and smb2 client connections.

http://gitweb.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/master3-smb2

This new smbXcli_conn/smbXcli_req infrastructure only handles the low
level stuff
like sending/receiving requests and signing (for smb1 and smb2).

There's a new smbXcli_negprot() which can negotiate everything from
the old CORE protocol up to SMB 2.22.

First I've based the smb2cli code from source3/libsmb on top of it.

Then the smb1 code from source3/libsmb/async_smb.c, then the smb1 trans code
from source3/libsmb/clitrans.c. There're some tricks to still support
cli_nterror() and similar calls...

Finally I managed to base the source4/libcli/smb2 code on the new
infrastructure,
so that all existing smb2 torture tests keep working (and even work with
signing enabled,
which didn't work before).

Converting source4/libcli/raw to the new infrastructure requires a bit
more work,
as I need to add support for SMBreadbraw first.

Basically I first copied existing code, then modified it to use new names
and private structures and then implemented the old code as wrapper
on top of the new code. I hope that makes the review a bit easier.

I'll also review it again, but it would be nice to get some additional
review from you.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20111104/cd990fec/attachment.pgp>


More information about the samba-technical mailing list