From: Volker Lendecke Date: Mon, 6 Feb 2023 20:40:38 +0000 (+0100) Subject: smbd: Remove dptr_struct->expect_close X-Git-Tag: talloc-2.4.1~1617 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a040c7f7eebb4ed549cc59f0b7bab461bf6d06d;p=thirdparty%2Fsamba.git smbd: Remove dptr_struct->expect_close This was only set but never read Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index dd968420007..859c8f0dc83 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -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; diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 7e7569feb5d..486d136bfbb 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -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); diff --git a/source3/smbd/smb1_reply.c b/source3/smbd/smb1_reply.c index b3477ba812b..1041e4f843b 100644 --- a/source3/smbd/smb1_reply.c +++ b/source3/smbd/smb1_reply.c @@ -1179,7 +1179,6 @@ void reply_search(struct smb_request *req) NULL, /* req */ fsp, /* fsp */ True, - expect_close, mask, dirtype, &fsp->dptr); diff --git a/source3/smbd/smb1_trans2.c b/source3/smbd/smb1_trans2.c index cb392810a57..87c5ec697b5 100644 --- a/source3/smbd/smb1_trans2.c +++ b/source3/smbd/smb1_trans2.c @@ -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); diff --git a/source3/smbd/smb2_query_directory.c b/source3/smbd/smb2_query_directory.c index 0d6fb11f9a8..250b56633bb 100644 --- a/source3/smbd/smb2_query_directory.c +++ b/source3/smbd/smb2_query_directory.c @@ -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);