From: Stefan Metzmacher Date: Thu, 11 Mar 2021 16:04:37 +0000 (+0100) Subject: smbXsrv_session: always cancel pending requests in smb2srv_session_shutdown_send... X-Git-Tag: tevent-0.11.0~1366 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4010b9abc4a303f478420de4295c3c00fbdbbf2;p=thirdparty%2Fsamba.git smbXsrv_session: always cancel pending requests in smb2srv_session_shutdown_send() in the same way 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 Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/smbXsrv_session.c b/source3/smbd/smbXsrv_session.c index f41a817cf27..0a4827519d1 100644 --- a/source3/smbd/smbXsrv_session.c +++ b/source3/smbd/smbXsrv_session.c @@ -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); }