From f00a3bfee7577c9ef82cb03b0580dccf0c7bc463 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 6 Aug 2009 12:53:05 +0200 Subject: [PATCH] s3:smbd: store a dirptr on the files_struct for SMB2 Query Directory metze --- source3/include/smb.h | 2 ++ source3/smbd/close.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/source3/include/smb.h b/source3/include/smb.h index 28bd60a670f5..4cd090bc7da8 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -459,6 +459,8 @@ typedef struct files_struct { struct notify_change_buf *notify; struct files_struct *base_fsp; /* placeholder for delete on close */ + + struct dptr_struct *dptr; } files_struct; #include "ntquotas.h" diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 788b0a7ceca6..1f2e4604c228 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -753,6 +753,10 @@ static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp, strerror(errno))); } + if (fsp->dptr) { + dptr_CloseDir(fsp->dptr); + } + /* * Do the code common to files and directories. */ -- 2.34.1