From: Jeremy Allison Date: Tue, 10 Mar 2020 19:25:58 +0000 (-0700) Subject: s3: smbd: Don't allow force disconnect of a connection already being disconnected. X-Git-Tag: ldb-2.2.0~1438 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac800ca6bcb43c74a1a6ef508b900e2e6cb532dc;p=thirdparty%2Fsamba.git 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 --- 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;