From 42afa596d5e58875944c5429fac4866a5614ebca Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 3 Aug 2012 16:38:38 +0200 Subject: s3:smbd: also close durable file handles in a tdis Pair-Programmed-With: Stefan Metzmacher --- source3/smbd/files.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 0550b31155..ef229a4098 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); } } -- cgit