s3:smb2_server: correctly maintain request counters for compound requests
commitde398573fe753a347cba35666fcf84b30a3307f7
authorStefan Metzmacher <metze@samba.org>
Wed, 11 Apr 2018 10:14:59 +0000 (11 12:14 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 12 Apr 2018 15:26:33 +0000 (12 17:26 +0200)
tree43977129c6d43c69a5e7e8711b4f6cde943ee30d
parentbb5526d01fabd308d848a0b72332a2361438fcf5
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>
(cherry picked from commit 87e25cd1e45bfe57292b62ffc44ddafc01c61ca0)
source3/smbd/smb2_server.c