s3:smb2_server: correctly maintain request counters for compound requests
authorStefan Metzmacher <metze@samba.org>
Wed, 11 Apr 2018 10:14:59 +0000 (12:14 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 12 Apr 2018 09:28:17 +0000 (11:28 +0200)
commit87e25cd1e45bfe57292b62ffc44ddafc01c61ca0
treeec16ddf894fd22d965daf776b6b0413e89b94ce9
parent09c21214798ad435db488d206050d842b117166e
s3:smb2_server: correctly maintain request counters for compound requests

If a session expires during a compound request chain,
we exit smbd_smb2_request_dispatch() with
'return smbd_smb2_request_error(req, ...)' before
calling smbd_smb2_request_dispatch_update_counts().

As req->request_counters_updated was only reset
within smbd_smb2_request_dispatch_update_counts(),
smbd_smb2_request_reply_update_counts() was called
twice on the same request, which triggers
SMB_ASSERT(op->request_count > 0);

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13215

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/smb2_server.c