]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/smbd: let canonicalize_ea_name accept fsp and fstring only in sig
authorNoel Power <noel.power@suse.com>
Wed, 10 Feb 2021 10:26:53 +0000 (10:26 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 26 Feb 2021 21:28:33 +0000 (21:28 +0000)
Remove the connection_struct & smb_fname parameters from
canonicalize_ea_name, they arent needed (and can be got from
files_struct)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/trans2.c

index ef254aca525bab57e190be9ffc30d71432d7e83d..679309056a45ecf1c49bc511e37d2611b89fd8c0 100644 (file)
@@ -712,16 +712,14 @@ static unsigned int estimate_ea_size(connection_struct *conn, files_struct *fsp)
  Ensure the EA name is case insensitive by matching any existing EA name.
 ****************************************************************************/
 
-static void canonicalize_ea_name(connection_struct *conn,
-                       files_struct *fsp,
-                       const struct smb_filename *smb_fname,
+static void canonicalize_ea_name(files_struct *fsp,
                        fstring unix_ea_name)
 {
        size_t total_ea_len;
        TALLOC_CTX *mem_ctx = talloc_tos();
        struct ea_list *ea_list;
        NTSTATUS status = get_ea_list_from_fsp(mem_ctx,
-                                              smb_fname->fsp,
+                                              fsp,
                                               &total_ea_len,
                                               &ea_list);
        if (!NT_STATUS_IS_OK(status)) {
@@ -785,10 +783,7 @@ NTSTATUS set_ea(connection_struct *conn, files_struct *fsp,
                fstrcpy(unix_ea_name, "user."); /* All EA's must start with user. */
                fstrcat(unix_ea_name, ea_list->ea.name);
 
-               canonicalize_ea_name(conn,
-                               fsp,
-                               fsp->fsp_name,
-                               unix_ea_name);
+               canonicalize_ea_name(fsp, unix_ea_name);
 
                DEBUG(10,("set_ea: ea_name %s ealen = %u\n", unix_ea_name, (unsigned int)ea_list->ea.value.length));