smbXsrv_session: always cancel pending requests in smb2srv_session_shutdown_send...
authorStefan Metzmacher <metze@samba.org>
Thu, 11 Mar 2021 16:04:37 +0000 (17:04 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 29 Mar 2021 19:36:37 +0000 (19:36 +0000)
The session is valid for the lifetime of the requests anyway
and there's no point in having special handling for compound requests.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smbXsrv_session.c

index f41a817cf27a009b7421caa056130ba4bbb5f6cf..0a4827519d13c2e9cfd9c5bc9bebe78d259a7b6f 100644 (file)
@@ -1723,28 +1723,7 @@ struct tevent_req *smb2srv_session_shutdown_send(TALLOC_CTX *mem_ctx,
                                continue;
                        }
 
-                       if (!NT_STATUS_IS_OK(xconn->transport.status)) {
-                               preq->session = NULL;
-                               /*
-                                * If we no longer have a session we can't
-                                * sign or encrypt replies.
-                                */
-                               preq->do_signing = false;
-                               preq->do_encryption = false;
-                               preq->preauth = NULL;
-
-                               if (preq->subreq != NULL) {
-                                       tevent_req_cancel(preq->subreq);
-                               }
-                               continue;
-                       }
-
-                       /*
-                        * Never cancel anything in a compound
-                        * request. Way too hard to deal with
-                        * the result.
-                        */
-                       if (!preq->compound_related && preq->subreq != NULL) {
+                       if (preq->subreq != NULL) {
                                tevent_req_cancel(preq->subreq);
                        }