smbd: Remove the smb_fname parameter from set_ea().
authorJeremy Allison <jra@samba.org>
Mon, 14 Dec 2020 20:15:48 +0000 (12:15 -0800)
committerRalph Boehme <slow@samba.org>
Wed, 16 Dec 2020 10:15:11 +0000 (10:15 +0000)
We know we must have a valid fsp.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Dec 16 10:15:11 UTC 2020 on sn-devel-184

source3/smbd/open.c
source3/smbd/proto.h
source3/smbd/trans2.c

index 8e1c456382f890ebbdc9a50a54a57429fee24d01..87857f350d1b30491bdee4dd4f52e533ac3af130 100644 (file)
@@ -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;
                }
index 4c436c004e6ab57026f09b45b00b70c1646a9a4b..6c28790080216914d56628a1677685c16aa1b880 100644 (file)
@@ -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,
index b1ed630b2053517162d09eaab42c9f6e1a7a42b2..db2103201274b65ed4746b0fd6139352325d6551 100644 (file)
@@ -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;