From: Michael Adam Date: Fri, 3 Aug 2012 14:38:38 +0000 (+0200) Subject: s3:smbd: also close durable file handles in a tdis X-Git-Tag: samba-4.0.0rc1~129 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=42afa596d5e58875944c5429fac4866a5614ebca;p=thirdparty%2Fsamba.git s3:smbd: also close durable file handles in a tdis Pair-Programmed-With: Stefan Metzmacher --- diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 0550b311552..ef229a4098a 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -151,9 +151,16 @@ void file_close_conn(connection_struct *conn) for (fsp=conn->sconn->files; fsp; fsp=next) { next = fsp->next; - if (fsp->conn == conn) { - close_file(NULL, fsp, SHUTDOWN_CLOSE); + if (fsp->conn != conn) { + continue; + } + if (fsp->op != NULL && fsp->op->global->durable) { + /* + * A tree disconnect closes a durable handle + */ + fsp->op->global->durable = false; } + close_file(NULL, fsp, SHUTDOWN_CLOSE); } }