From: Noel Power Date: Mon, 8 Feb 2021 17:38:54 +0000 (+0000) Subject: s3/smbd: remove connection_struct param from get_ea_list_from_file X-Git-Tag: tevent-0.11.0~1713 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9c0660fb5399f0afe29ad456135a2e44216ff944;p=thirdparty%2Fsamba.git s3/smbd: remove connection_struct param from get_ea_list_from_file Signed-off-by: Noel Power Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index aa875c01305..ded78bf068e 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -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)) {