summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-07-07 13:00:24 +0200
committerStefan Metzmacher <metze@samba.org>2008-07-07 13:43:12 +0200
commit50df83ac8cf2289c87efbbecdbfa1501a2fbd65c (patch)
tree7b36aad6b4d81b931dad67e2b57c738fb801dcf0 /source4
parent88a26f6e7fb8737f33e100a5e83138b0fb63efd4 (diff)
downloadsamba-50df83ac8cf2289c87efbbecdbfa1501a2fbd65c.tar.gz
samba-50df83ac8cf2289c87efbbecdbfa1501a2fbd65c.tar.bz2
samba-50df83ac8cf2289c87efbbecdbfa1501a2fbd65c.zip
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)
Diffstat (limited to 'source4')
-rw-r--r--source4/smb_server/smb/trans2.c13
1 files changed, 12 insertions, 1 deletions
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;
}