s3:smbd: store a dirptr on the files_struct for SMB2 Query Directory
authorStefan Metzmacher <metze@samba.org>
Thu, 6 Aug 2009 10:53:05 +0000 (12:53 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 19 Aug 2009 20:12:42 +0000 (22:12 +0200)
metze

source3/include/smb.h
source3/smbd/close.c

index 28bd60a670f5e1390dbb9f4c11a3bdc063eca487..4cd090bc7da810c61d4f5c4dce9725d5ce0c758e 100644 (file)
@@ -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"
index 788b0a7ceca6f3f12fe7dd7f4816199314f798f8..1f2e4604c228f23722a0707b27ebbf872e1bf668 100644 (file)
@@ -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.
         */