smbd: remove calls to dptr_init_search_op() from TRANS2 search code
authorUri Simchoni <uri@samba.org>
Fri, 10 Nov 2017 19:35:54 +0000 (21:35 +0200)
committerJeremy Allison <jra@samba.org>
Sat, 11 Nov 2017 03:49:27 +0000 (04:49 +0100)
dptr_init_search_op() invokes VFS operations which are no-op in all
in-tree VFS modules. Furthermore, it's not being called by the SMB2
search code, so probably it's not being used by any out-of-tree VFS
module either.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/trans2.c

index de6073a973fdbc35197caf5831199727b83f49f2..dbad71be3b759ef8109f9f5da21f60d5e942e36d 100644 (file)
@@ -2867,9 +2867,6 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
        dptr_num = dptr_dnum(dirptr);
        DEBUG(4,("dptr_num is %d, wcard = %s, attr = %d\n", dptr_num, mask, dirtype));
 
-       /* Initialize per TRANS2_FIND_FIRST operation data */
-       dptr_init_search_op(dirptr);
-
        /* We don't need to check for VOL here as this is returned by
                a different TRANS2 call. */
 
@@ -3237,9 +3234,6 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
                dptr_TellDir(dirptr),
                (int)backup_priv));
 
-       /* Initialize per TRANS2_FIND_NEXT operation data */
-       dptr_init_search_op(dirptr);
-
        /* We don't need to check for VOL here as this is returned by
                a different TRANS2 call. */