smbd: Remove dptr_struct->expect_close
authorVolker Lendecke <vl@samba.org>
Mon, 6 Feb 2023 20:40:38 +0000 (21:40 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 13 Feb 2023 20:28:33 +0000 (20:28 +0000)
This was only set but never read

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/dir.c
source3/smbd/proto.h
source3/smbd/smb1_reply.c
source3/smbd/smb1_trans2.c
source3/smbd/smb2_query_directory.c

index dd9684200078351a9644b76987ee3fb6195bde46..859c8f0dc83448c0a1b4b9af60adbaf2c3f1c228 100644 (file)
@@ -69,7 +69,6 @@ struct dptr_struct {
        int dnum;
        struct connection_struct *conn;
        struct smb_Dir *dir_hnd;
-       bool expect_close;
        char *wcard;
        uint32_t attr;
        bool has_wild; /* Set to true if the wcard entry has MS wildcard characters in it. */
@@ -209,7 +208,6 @@ NTSTATUS dptr_create(connection_struct *conn,
                struct smb_request *req,
                files_struct *fsp,
                bool old_handle,
-               bool expect_close,
                const char *wcard,
                uint32_t attr,
                struct dptr_struct **dptr_ret)
@@ -250,7 +248,6 @@ NTSTATUS dptr_create(connection_struct *conn,
 
        dptr->conn = conn;
        dptr->dir_hnd = dir_hnd;
-       dptr->expect_close = expect_close;
        dptr->wcard = talloc_strdup(dptr, wcard);
        if (!dptr->wcard) {
                TALLOC_FREE(dptr);
@@ -312,8 +309,8 @@ NTSTATUS dptr_create(connection_struct *conn,
        DLIST_ADD(sconn->searches.dirptrs, dptr);
 
 done:
-       DBG_INFO("creating new dirptr [%d] for path [%s], expect_close = %d\n",
-                dptr->dnum, fsp_str_dbg(fsp), expect_close);
+       DBG_INFO("creating new dirptr [%d] for path [%s]\n",
+                dptr->dnum, fsp_str_dbg(fsp));
 
        *dptr_ret = dptr;
 
index 7e7569feb5dbb16f8b240e79a39ba4d0c7ae0a4a..486d136bfbb7802008084f37ec88c9adb4aa0728 100644 (file)
@@ -187,7 +187,6 @@ NTSTATUS dptr_create(connection_struct *conn,
                struct smb_request *req,
                files_struct *fsp,
                bool old_handle,
-               bool expect_close,
                const char *wcard,
                uint32_t attr,
                struct dptr_struct **dptr_ret);
index b3477ba812b7e81c3c61c6e2a61c03ae1cdab454..1041e4f843bc78126cf132cfe4eae44975e679c9 100644 (file)
@@ -1179,7 +1179,6 @@ void reply_search(struct smb_request *req)
                                        NULL, /* req */
                                        fsp, /* fsp */
                                        True,
-                                       expect_close,
                                        mask,
                                        dirtype,
                                        &fsp->dptr);
index cb392810a574ce41a3b563c22d6903e9d4e98f21..87c5ec697b52651de45d34254eceaf99844084ff 100644 (file)
@@ -1059,7 +1059,6 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
                                req,
                                fsp, /* fsp */
                                False,
-                               True,
                                mask,
                                dirtype,
                                &fsp->dptr);
index 0d6fb11f9a84fdd8685c452e616cd97a6bb73bc5..250b56633bbf7adf979dd7e91115650ab950dbbf 100644 (file)
@@ -426,7 +426,6 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx,
                                     NULL, /* req */
                                     fsp,
                                     false, /* old_handle */
-                                    false, /* expect_close */
                                     state->in_file_name, /* wcard */
                                     state->dirtype,
                                     &fsp->dptr);