From 50df83ac8cf2289c87efbbecdbfa1501a2fbd65c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 7 Jul 2008 13:00:24 +0200 Subject: smb_server/smb: transs and transs2 calls have different word counts Also add a note about NT_STATUS_DOS(ERRSRV, ERRerror). metze (This used to be commit 4287b7c1323796cf0688d0fae9b5bd4e840e3d48) --- source4/smb_server/smb/trans2.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/smb_server/smb/trans2.c b/source4/smb_server/smb/trans2.c index fc17491c42..5d206f9ea8 100644 --- a/source4/smb_server/smb/trans2.c +++ b/source4/smb_server/smb/trans2.c @@ -1291,9 +1291,20 @@ static void reply_transs_generic(struct smbsrv_request *req, uint8_t command) uint16_t param_disp, data_disp; uint16_t param_total, data_total; DATA_BLOB params, data; + uint8_t wct; + + if (command == SMBtrans2) { + wct = 9; + } else { + wct = 8; + } /* parse request */ - if (req->in.wct < 8) { + if (req->in.wct != wct) { + /* + * TODO: add some error code tests + * w2k3 returns NT_STATUS_DOS(ERRSRV, ERRerror) here + */ smbsrv_send_error(req, NT_STATUS_INVALID_PARAMETER); return; } -- cgit