summaryrefslogtreecommitdiff
path: root/source3/smbd/smb2_find.c
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2012-02-27 17:51:40 -0800
committerJeremy Allison <jra@samba.org>2012-03-09 16:48:16 -0800
commitf6afda0bc867f1080c45e1f6f79d5032c41d2b1a (patch)
treeb3d894270bad4a4e4165f95164dffef7d1497b37 /source3/smbd/smb2_find.c
parenteec5ece6f59c5ff30de88af0e182c3b2f7b9579c (diff)
downloadsamba-f6afda0bc867f1080c45e1f6f79d5032c41d2b1a.tar.gz
samba-f6afda0bc867f1080c45e1f6f79d5032c41d2b1a.tar.bz2
samba-f6afda0bc867f1080c45e1f6f79d5032c41d2b1a.zip
s3:smb2_server verify creditcharge
for all requests that have max_???? checks, also do a check of the creditcharge the client has sent (when using largemtu) Signed-off-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd/smb2_find.c')
-rw-r--r--source3/smbd/smb2_find.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/smb2_find.c b/source3/smbd/smb2_find.c
index 99d3447860..9c0d18b278 100644
--- a/source3/smbd/smb2_find.c
+++ b/source3/smbd/smb2_find.c
@@ -282,6 +282,14 @@ static struct tevent_req *smbd_smb2_find_send(TALLOC_CTX *mem_ctx,
return tevent_req_post(req, ev);
}
+ status = smbd_smb2_request_verify_creditcharge(smb2req,
+ in_output_buffer_length);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
+ return tevent_req_post(req, ev);
+ }
+
switch (in_file_info_class) {
case SMB2_FIND_DIRECTORY_INFO:
info_level = SMB_FIND_FILE_DIRECTORY_INFO;