From: Jeremy Allison Date: Tue, 29 Sep 2020 21:08:09 +0000 (-0700) Subject: s3: smbd: All callers to filename_convert() pass in NULL for the 'bool *ppath_contain... X-Git-Tag: talloc-2.3.2~387 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff4e8b2c841ac2d901faeac42f8625110440b56a;p=thirdparty%2Fsamba.git s3: smbd: All callers to filename_convert() pass in NULL for the 'bool *ppath_contains_wcard' parameter. Remove it. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c index 6d955269ab0..2f18127b03b 100644 --- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c +++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c @@ -2420,7 +2420,6 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p, r->in.file, ucf_flags, 0, - NULL, &smb_fname); if (!NT_STATUS_IS_OK(nt_status)) { werr = ntstatus_to_werror(nt_status); @@ -2556,7 +2555,6 @@ WERROR _srvsvc_NetSetFileSecurity(struct pipes_struct *p, r->in.file, ucf_flags, 0, - NULL, &smb_fname); if (!NT_STATUS_IS_OK(nt_status)) { werr = ntstatus_to_werror(nt_status); diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index f7c49cc907f..d0be60a42f3 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -2009,16 +2009,16 @@ NTSTATUS filename_convert(TALLOC_CTX *ctx, const char *name_in, uint32_t ucf_flags, NTTIME twrp, - bool *ppath_contains_wcard, struct smb_filename **pp_smb_fname) { + bool ignore = false; return filename_convert_internal(ctx, conn, NULL, name_in, ucf_flags, twrp, - ppath_contains_wcard, + &ignore, pp_smb_fname); } diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index c8c1858785b..bc3cb82c889 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -630,7 +630,6 @@ void reply_ntcreate_and_X(struct smb_request *req) fname, ucf_flags, 0, - NULL, &smb_fname); TALLOC_FREE(case_state); @@ -1234,7 +1233,6 @@ static void call_nt_transact_create(connection_struct *conn, fname, ucf_flags, 0, - NULL, &smb_fname); TALLOC_FREE(case_state); @@ -1772,7 +1770,6 @@ void reply_ntrename(struct smb_request *req) oldname, ucf_flags_src, 0, - NULL, &smb_fname_old); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status, @@ -1804,7 +1801,6 @@ void reply_ntrename(struct smb_request *req) newname, ucf_flags_dst, 0, - NULL, &smb_fname_new); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status, diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index a4a1b0caefe..394122420fd 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -390,7 +390,6 @@ NTSTATUS filename_convert(TALLOC_CTX *mem_ctx, const char *name_in, uint32_t ucf_flags, NTTIME twrp, - bool *ppath_contains_wcard, struct smb_filename **pp_smb_fname); NTSTATUS filename_convert_with_privilege(TALLOC_CTX *mem_ctx, connection_struct *conn, diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 4c83d09ab3e..325196c6f13 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1283,7 +1283,6 @@ void reply_checkpath(struct smb_request *req) name, ucf_flags, 0, - NULL, &smb_fname); if (!NT_STATUS_IS_OK(status)) { @@ -1382,7 +1381,6 @@ void reply_getatr(struct smb_request *req) fname, ucf_flags, 0, - NULL, &smb_fname); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { @@ -1485,7 +1483,6 @@ void reply_setatr(struct smb_request *req) fname, ucf_flags, 0, - NULL, &smb_fname); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { @@ -1795,7 +1792,6 @@ void reply_search(struct smb_request *req) path, ucf_flags, 0, - NULL, &smb_fname); if (!NT_STATUS_IS_OK(nt_status)) { if (NT_STATUS_EQUAL(nt_status,NT_STATUS_PATH_NOT_COVERED)) { @@ -2224,7 +2220,6 @@ void reply_open(struct smb_request *req) fname, ucf_flags, 0, - NULL, &smb_fname); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { @@ -2415,7 +2410,6 @@ void reply_open_and_X(struct smb_request *req) fname, ucf_flags, 0, - NULL, &smb_fname); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { @@ -2841,7 +2835,6 @@ void reply_mknew(struct smb_request *req) fname, ucf_flags, 0, - NULL, &smb_fname); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { @@ -2984,7 +2977,6 @@ void reply_ctemp(struct smb_request *req) fname, ucf_flags, 0, - NULL, &smb_fname); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { @@ -3566,7 +3558,6 @@ void reply_unlink(struct smb_request *req) name, ucf_flags, 0, - NULL, &smb_fname); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { @@ -7097,7 +7088,6 @@ void reply_mkdir(struct smb_request *req) directory, ucf_flags, 0, - NULL, &smb_dname); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { @@ -7167,7 +7157,6 @@ void reply_rmdir(struct smb_request *req) directory, ucf_flags, 0, - NULL, &smb_dname); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { @@ -8346,7 +8335,6 @@ void reply_mv(struct smb_request *req) name, src_ucf_flags, 0, - NULL, &smb_fname_src); if (!NT_STATUS_IS_OK(status)) { @@ -8364,7 +8352,6 @@ void reply_mv(struct smb_request *req) newname, dst_ucf_flags, 0, - NULL, &smb_fname_dst); if (!NT_STATUS_IS_OK(status)) { @@ -8680,7 +8667,6 @@ void reply_copy(struct smb_request *req) fname_src, ucf_flags_src, 0, - NULL, &smb_fname_src); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { @@ -8696,7 +8682,6 @@ void reply_copy(struct smb_request *req) fname_dst, ucf_flags_dst, 0, - NULL, &smb_fname_dst); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 05fa704da72..c082b806743 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -461,7 +461,7 @@ static NTSTATUS smbd_smb2_create_durable_lease_check(struct smb_request *smb1req ucf_flags = filename_create_ucf_flags(smb1req, FILE_OPEN); status = filename_convert(talloc_tos(), fsp->conn, filename, ucf_flags, - 0, NULL, &smb_fname); + 0, &smb_fname); TALLOC_FREE(filename); if (!NT_STATUS_IS_OK(status)) { DEBUG(10, ("filename_convert returned %s\n", @@ -946,7 +946,6 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, state->fname, ucf_flags, state->twrp_time, - NULL, /* ppath_contains_wcards */ &smb_fname); if (!NT_STATUS_IS_OK(status)) { tevent_req_nterror(req, status); diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index a02b226a55f..174d646dbf1 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1365,7 +1365,6 @@ static void call_trans2open(connection_struct *conn, fname, ucf_flags, 0, - NULL, &smb_fname); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { @@ -2839,7 +2838,6 @@ close_if_end = %d requires_resume_key = %d backup_priv = %d level = 0x%x, max_da directory, ucf_flags, 0, - NULL, &smb_dname); } @@ -6186,7 +6184,6 @@ static void call_trans2qfilepathinfo(connection_struct *conn, fname, ucf_flags, 0, - NULL, &smb_fname); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { @@ -7080,7 +7077,6 @@ static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn, oldname, ucf_flags, 0, - NULL, &smb_fname_old); if (!NT_STATUS_IS_OK(status)) { return status; @@ -7156,7 +7152,6 @@ static NTSTATUS smb2_file_rename_information(connection_struct *conn, newname, ucf_flags, 0, - NULL, &smb_fname_dst); if (!NT_STATUS_IS_OK(status)) { return status; @@ -7272,7 +7267,6 @@ static NTSTATUS smb_file_link_information(connection_struct *conn, newname, ucf_flags, 0, - NULL, &smb_fname_dst); if (!NT_STATUS_IS_OK(status)) { return status; @@ -7438,7 +7432,6 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn, base_name, ucf_flags, 0, - NULL, &smb_fname_dst); /* If an error we expect this to be @@ -9413,7 +9406,6 @@ static void call_trans2setfilepathinfo(connection_struct *conn, fname, ucf_flags, 0, - NULL, &smb_fname); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { @@ -9569,7 +9561,6 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req, directory, ucf_flags, 0, - NULL, &smb_dname); if (!NT_STATUS_IS_OK(status)) {