From 874c5fcf6daaa88eddd374f7c8d5162590b046c8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 14 Dec 2020 12:15:48 -0800 Subject: [PATCH] smbd: Remove the smb_fname parameter from set_ea(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We know we must have a valid fsp. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Wed Dec 16 10:15:11 UTC 2020 on sn-devel-184 --- source3/smbd/open.c | 2 +- source3/smbd/proto.h | 2 +- source3/smbd/trans2.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 8e1c456382f..87857f350d1 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -5981,7 +5981,7 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, if ((ea_list != NULL) && ((info == FILE_WAS_CREATED) || (info == FILE_WAS_OVERWRITTEN))) { - status = set_ea(conn, fsp, fsp->fsp_name, ea_list); + status = set_ea(conn, fsp, ea_list); if (!NT_STATUS_IS_OK(status)) { goto fail; } diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 4c436c004e6..6c287900802 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -1198,7 +1198,7 @@ NTSTATUS get_ea_names_from_file(TALLOC_CTX *mem_ctx, char ***pnames, size_t *pnum_names); NTSTATUS set_ea(connection_struct *conn, files_struct *fsp, - const struct smb_filename *smb_fname, struct ea_list *ea_list); + struct ea_list *ea_list); struct ea_list *read_ea_list_entry(TALLOC_CTX *ctx, const char *pdata, size_t data_size, size_t *pbytes_used); void send_trans2_replies(connection_struct *conn, struct smb_request *req, diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index b1ed630b205..db210320127 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -776,7 +776,7 @@ static void canonicalize_ea_name(connection_struct *conn, ****************************************************************************/ NTSTATUS set_ea(connection_struct *conn, files_struct *fsp, - const struct smb_filename *smb_fname, struct ea_list *ea_list) + struct ea_list *ea_list) { NTSTATUS status; bool posix_pathnames = false; @@ -6834,7 +6834,7 @@ static NTSTATUS smb_info_set_ea(connection_struct *conn, return NT_STATUS_ACCESS_DENIED; } - status = set_ea(conn, fsp, smb_fname, ea_list); + status = set_ea(conn, fsp, ea_list); return status; } @@ -6877,7 +6877,7 @@ static NTSTATUS smb_set_file_full_ea_info(connection_struct *conn, return NT_STATUS_INVALID_PARAMETER; } - status = set_ea(conn, fsp, fsp->fsp_name, ea_list); + status = set_ea(conn, fsp, ea_list); DEBUG(10, ("smb_set_file_full_ea_info on file %s returned %s\n", smb_fname_str_dbg(fsp->fsp_name), @@ -9702,7 +9702,7 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req, /* Try and set any given EA. */ if (ea_list) { - status = set_ea(conn, fsp, smb_dname, ea_list); + status = set_ea(conn, fsp, ea_list); if (!NT_STATUS_IS_OK(status)) { reply_nterror(req, status); goto out;