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)
commitca6d9be6cb6a403a81b18fa6e9a6a0518d7f0f68
treea352ff0e89760476219c20b566be2455ee1102fa
parent36a31f31c4c01f4ebf1359650c497a1ba447e6d0
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.
28 files changed:
source/libcli/raw/clisession.c
source/libcli/raw/clitransport.c
source/libcli/raw/clitree.c
source/libcli/raw/libcliraw.h
source/libcli/raw/rawfile.c
source/libcli/raw/rawioctl.c
source/libcli/raw/rawnegotiate.c
source/libcli/raw/rawreadwrite.c
source/libcli/raw/rawrequest.c
source/libcli/raw/rawsearch.c
source/libcli/raw/request.h
source/libcli/raw/smb_signing.c
source/libcli/smb2/request.c
source/libcli/smb2/smb2.h
source/libcli/smb2/transport.c
source/smb_server/blob.c
source/smb_server/smb/negprot.c
source/smb_server/smb/nttrans.c
source/smb_server/smb/receive.c
source/smb_server/smb/reply.c
source/smb_server/smb/request.c
source/smb_server/smb/search.c
source/smb_server/smb/trans2.c
source/smb_server/smb2/fileinfo.c
source/smb_server/smb2/negprot.c
source/smb_server/smb2/receive.c
source/smb_server/smb2/tcon.c
source/smb_server/smb_server.h