Convert SMB and SMB2 code to use a common buffer handling structure
authorAndrew Tridgell <tridge@samba.org>
Wed, 13 Feb 2008 23:12:33 +0000 (10:12 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 13 Feb 2008 23:12:33 +0000 (10:12 +1100)
commite870cfec9f3512b0f1bd3110d7b975652525e28a
tree2a26a6764bcbc5bd63a8402b6ac1fd7e68be6724
parent4c01d70a4469ffc25f9a10473cb135bb38a454c7
Convert SMB and SMB2 code to use a common buffer handling structure

This converts our SMB and SMB2 code to use a common structure "struct
request_bufinfo" for information on the buffer bounds of a packet,
alignment information and string handling. This allows us to use a
common backend for SMB and SMB2 code, while still using all the same
string and blob handling functions.

Up to now we had been passing a NULL req handle into these common
routines from the SMB2 side of the server, which meant that we failed
any operation which did a bounds checked string extraction (such as a
RenameInformation setinfo call, which is what Vista uses for renaming
files)

There is still some more work to be done on this - for example we can
now remove many of the SMB2 specific buffer handling functions that we
had, and use the SMB ones.
(This used to be commit ca6d9be6cb6a403a81b18fa6e9a6a0518d7f0f68)
28 files changed:
source4/libcli/raw/clisession.c
source4/libcli/raw/clitransport.c
source4/libcli/raw/clitree.c
source4/libcli/raw/libcliraw.h
source4/libcli/raw/rawfile.c
source4/libcli/raw/rawioctl.c
source4/libcli/raw/rawnegotiate.c
source4/libcli/raw/rawreadwrite.c
source4/libcli/raw/rawrequest.c
source4/libcli/raw/rawsearch.c
source4/libcli/raw/request.h
source4/libcli/raw/smb_signing.c
source4/libcli/smb2/request.c
source4/libcli/smb2/smb2.h
source4/libcli/smb2/transport.c
source4/smb_server/blob.c
source4/smb_server/smb/negprot.c
source4/smb_server/smb/nttrans.c
source4/smb_server/smb/receive.c
source4/smb_server/smb/reply.c
source4/smb_server/smb/request.c
source4/smb_server/smb/search.c
source4/smb_server/smb/trans2.c
source4/smb_server/smb2/fileinfo.c
source4/smb_server/smb2/negprot.c
source4/smb_server/smb2/receive.c
source4/smb_server/smb2/tcon.c
source4/smb_server/smb_server.h