s3: smbd: Add dptr_fetch_fsp() for SMB1 code. We will use this to replace dptr_fetch().
authorJeremy Allison <jra@samba.org>
Wed, 17 Jul 2019 20:05:43 +0000 (13:05 -0700)
committerRalph Boehme <slow@samba.org>
Tue, 6 Aug 2019 14:23:34 +0000 (14:23 +0000)
Not yet used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/dir.c
source3/smbd/proto.h

index 25a7a2e165b4a77a055a49f0b0a3cb15a9d25612..1cecef1997b8a0d950e99bf50a1a9753827fdf69 100644 (file)
@@ -817,6 +817,22 @@ struct dptr_struct *dptr_fetch(struct smbd_server_connection *sconn,
        return(dptr);
 }
 
+/****************************************************************************
+ Return the associated fsp and seek the dir_hnd on it it given the 5 byte
+ server field.
+****************************************************************************/
+
+files_struct *dptr_fetch_fsp(struct smbd_server_connection *sconn,
+                              char *buf, int *num)
+{
+       struct dptr_struct *dptr = dptr_fetch(sconn, buf, num);
+
+       if (dptr == NULL) {
+               return NULL;
+       }
+       return dptr->dir_hnd->fsp;
+}
+
 /****************************************************************************
  Fetch the dir ptr.
 ****************************************************************************/
index 2efabf3e41a7bbcc686c028b9a70755ca371500c..66b756a9c2e0cd32b3ce0516237da1dc92a9651b 100644 (file)
@@ -209,6 +209,8 @@ bool dptr_fill(struct smbd_server_connection *sconn,
               char *buf1,unsigned int key);
 struct dptr_struct *dptr_fetch(struct smbd_server_connection *sconn,
                               char *buf,int *num);
+files_struct *dptr_fetch_fsp(struct smbd_server_connection *sconn,
+                              char *buf,int *num);
 struct dptr_struct *dptr_fetch_lanman2(struct smbd_server_connection *sconn,
                                       int dptr_num);
 bool get_dir_entry(TALLOC_CTX *ctx,