From ac800ca6bcb43c74a1a6ef508b900e2e6cb532dc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 10 Mar 2020 12:25:58 -0700 Subject: [PATCH] s3: smbd: Don't allow force disconnect of a connection already being disconnected. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14301 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/conn_idle.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source3/smbd/conn_idle.c b/source3/smbd/conn_idle.c index cd12e3f1266..698dc6e3a32 100644 --- a/source3/smbd/conn_idle.c +++ b/source3/smbd/conn_idle.c @@ -103,6 +103,11 @@ void conn_force_tdis( } tcon = conn->tcon; + if (!NT_STATUS_IS_OK(tcon->status)) { + /* In the process of already being disconnected. */ + continue; + } + do_close = check_fn(conn, private_data); if (!do_close) { continue;