]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/smbd: remove connection_struct param from get_ea_list_from_file
authorNoel Power <noel.power@suse.com>
Mon, 8 Feb 2021 17:38:54 +0000 (17:38 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 26 Feb 2021 21:28:33 +0000 (21:28 +0000)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/trans2.c

index aa875c013057634d8fa4f79b8ad82ede1100f3d0..ded78bf068e1c10d162cf5cd35c0c5f4b26c6d77 100644 (file)
@@ -528,19 +528,19 @@ static NTSTATUS get_ea_list_from_file_path(TALLOC_CTX *mem_ctx,
 }
 
 static NTSTATUS get_ea_list_from_fsp(TALLOC_CTX *mem_ctx,
-                               connection_struct *conn, files_struct *fsp,
+                               files_struct *fsp,
                                size_t *pea_total_len,
                                struct ea_list **ea_list)
 {
        *pea_total_len = 0;
        *ea_list = NULL;
 
-       if (!lp_ea_support(SNUM(conn))) {
+       /* symlink */
+       if (fsp == NULL) {
                return NT_STATUS_OK;
        }
 
-       /* symlink */
-       if (fsp == NULL) {
+       if (!lp_ea_support(SNUM(fsp->conn))) {
                return NT_STATUS_OK;
        }
 
@@ -549,7 +549,7 @@ static NTSTATUS get_ea_list_from_fsp(TALLOC_CTX *mem_ctx,
        }
 
        return get_ea_list_from_file_path(mem_ctx,
-                               conn,
+                               fsp->conn,
                                fsp,
                                pea_total_len,
                                ea_list);
@@ -1990,7 +1990,7 @@ static NTSTATUS smbd_marshall_dir_entry(TALLOC_CTX *ctx,
                SSVAL(p,20,mode);
                p += 22; /* p now points to the EA area. */
 
-               status = get_ea_list_from_fsp(ctx, conn,
+               status = get_ea_list_from_fsp(ctx,
                                               smb_fname->fsp,
                                               &ea_len, &file_list);
                if (!NT_STATUS_IS_OK(status)) {
@@ -5453,7 +5453,7 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
                        DEBUG(10,("smbd_do_qfilepathinfo: SMB_INFO_QUERY_EAS_FROM_LIST\n"));
 
                        status =
-                           get_ea_list_from_fsp(mem_ctx, conn,
+                           get_ea_list_from_fsp(mem_ctx,
                                                  smb_fname->fsp,
                                                  &total_ea_len, &ea_file_list);
                        if (!NT_STATUS_IS_OK(status)) {
@@ -5478,7 +5478,7 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
                        size_t total_ea_len = 0;
                        DEBUG(10,("smbd_do_qfilepathinfo: SMB_INFO_QUERY_ALL_EAS\n"));
 
-                       status = get_ea_list_from_fsp(mem_ctx, conn,
+                       status = get_ea_list_from_fsp(mem_ctx,
                                                        smb_fname->fsp,
                                                        &total_ea_len, &ea_list);
                        if (!NT_STATUS_IS_OK(status)) {
@@ -5506,7 +5506,7 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
                        /*TODO: add filtering and index handling */
 
                        status  =
-                               get_ea_list_from_fsp(mem_ctx, conn,
+                               get_ea_list_from_fsp(mem_ctx,
                                                  smb_fname->fsp,
                                                  &total_ea_len, &ea_file_list);
                        if (!NT_STATUS_IS_OK(status)) {