diff options
author | Michael Adam <obnox@samba.org> | 2012-08-03 16:38:38 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-09-08 03:39:06 +0200 |
commit | 42afa596d5e58875944c5429fac4866a5614ebca (patch) | |
tree | 46604748949135231503c28df896bfc1f6f77cbb /source3 | |
parent | f0a5b791ae4e64e42270edad7a961aa046efbaac (diff) | |
download | samba-42afa596d5e58875944c5429fac4866a5614ebca.tar.gz samba-42afa596d5e58875944c5429fac4866a5614ebca.tar.bz2 samba-42afa596d5e58875944c5429fac4866a5614ebca.zip |
s3:smbd: also close durable file handles in a tdis
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/files.c | 11 |
1 files changed, 9 insertions, 2 deletions
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); } } |